diff options
author | Alon Zakai <azakai@mozilla.com> | 2010-11-17 23:13:17 -0800 |
---|---|---|
committer | Alon Zakai <azakai@mozilla.com> | 2010-11-17 23:13:17 -0800 |
commit | daa624b9f9be7abdff1c4551e193a26f913b695b (patch) | |
tree | 6d321cc891ef5377c3e77fbf21abf9f3496cc16f /src/preamble.js | |
parent | 6ce73a0bd1f8a1c6b2edf4b2f3d5eca64bcf3544 (diff) |
tweaks for frontend-optimized input
Diffstat (limited to 'src/preamble.js')
-rw-r--r-- | src/preamble.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/preamble.js b/src/preamble.js index 439e0e41..bff5b91a 100644 --- a/src/preamble.js +++ b/src/preamble.js @@ -226,7 +226,7 @@ function __formatString() { var argIndex = 1; var ret = []; var curr = -1; - while (curr != 0) { + while (curr) { // Note: should be curr != 0, technically. But this helps catch bugs with undefineds #if USE_TYPED_ARRAYS curr = IHEAP[textIndex]; next = IHEAP[textIndex+1]; @@ -332,7 +332,7 @@ _llvm_memset_p0i8_i64 = _llvm_memset_p0i8_i32 = llvm_memset_i32; function _strlen(ptr) { var i = 0; - while (IHEAP[ptr+i] != 0) i++; + while (IHEAP[ptr+i]) i++; // Note: should be IHEAP[ptr+i] != 0, technically. But this helps catch bugs with undefineds return i; } |