aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/library.js2
-rw-r--r--src/settings.js4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/library.js b/src/library.js
index 901c9474..26ce8457 100644
--- a/src/library.js
+++ b/src/library.js
@@ -1641,8 +1641,8 @@ LibraryManager.library = {
for (var i = 0; i < maxx; i++) {
next = get();
{{{ makeSetValue('argPtr++', 0, 'next', 'i8') }}};
+ if (next === 0) return i > 0 ? fields : fields-1; // we failed to read the full length of this field
}
- if (next === 0) return fields-1; // we failed to read this field
formatIndex += nextC - formatIndex + 1;
continue;
}
diff --git a/src/settings.js b/src/settings.js
index 720fb53f..1cfb4030 100644
--- a/src/settings.js
+++ b/src/settings.js
@@ -251,8 +251,8 @@ var DISABLE_EXCEPTION_CATCHING = 0; // Disables generating code to actually catc
// TODO: Make this also remove cxa_begin_catch etc., optimize relooper
// for it, etc. (perhaps do all of this as preprocessing on .ll?)
-var EXCEPTION_CATCHING_WHITELIST = []; // Enables catching exception in listed functions if
- // DISABLE_EXCEPTION_CATCHING = 2 set
+var EXCEPTION_CATCHING_WHITELIST = []; // Enables catching exception in the listed functions only, if
+ // DISABLE_EXCEPTION_CATCHING = 2 is set
var EXECUTION_TIMEOUT = -1; // Throw an exception after X seconds - useful to debug infinite loops
var CHECK_OVERFLOWS = 0; // Add code that checks for overflows in integer math operations.