aboutsummaryrefslogtreecommitdiff
path: root/emscripten.py
diff options
context:
space:
mode:
Diffstat (limited to 'emscripten.py')
-rwxr-xr-xemscripten.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/emscripten.py b/emscripten.py
index df51d840..236a2e4e 100755
--- a/emscripten.py
+++ b/emscripten.py
@@ -322,7 +322,7 @@ def emscript(infile, settings, outfile, libraries=[], compiler_engine=None,
i += 2
#print >> sys.stderr, 'function indexing', indexed, curr, sig
forwarded_json['Functions']['indexedFunctions'][indexed] = curr # make sure not to modify this python object later - we use it in indexize
- if alias: i = max(table_counters.values())
+ if alias: i = max(table_counters.values()) if len(table_counters) > 0 else 2 + 2*settings['RESERVED_FUNCTION_POINTERS']
forwarded_json['Functions']['nextIndex'] = i # post phase can continue to add, in getIndex
def split_32(x):