diff options
-rw-r--r-- | src/preamble.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/preamble.js b/src/preamble.js index 4c61a86e..55a8a3a5 100644 --- a/src/preamble.js +++ b/src/preamble.js @@ -525,6 +525,9 @@ function Pointer_stringify(ptr, /* optional */ length) { var t; var i = 0; while (1) { +#if ASSERTIONS + assert(ptr + i < TOTAL_MEMORY); +#endif t = {{{ makeGetValue('ptr', 'i', 'i8', 0, 1) }}}; if (t >= 128) hasUtf = true; else if (t == 0 && !length) break; |