diff options
-rwxr-xr-x | emscripten.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/emscripten.py b/emscripten.py index 7c9cbdbe..75e6711a 100755 --- a/emscripten.py +++ b/emscripten.py @@ -117,7 +117,7 @@ def emscript(infile, settings, outfile, libraries=[], compiler_engine=None, last = func_start func_start = ll.find('\ndefine ', func_start) if func_start > last: - pre.append(ll[last:min(func_start+1, meta_start)] + '\n') + pre.append(ll[last:min(func_start+1, meta_start) if meta_start > 0 else func_start+1] + '\n') if func_start < 0: pre.append(ll[last:meta_start] + '\n') break |