diff options
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 8b10b3c2..82dbdcb3 100644 --- a/src/preamble.js +++ b/src/preamble.js @@ -140,9 +140,9 @@ function _strlen(p) { // return p.slab.length; // XXX might want to find the null terminator... } -function String_copy(p) { +function String_copy(p, addZero) { // XXX hardcoded ptr impl - return HEAP.slice(p, p+_strlen(p)).concat([0]); + return HEAP.slice(p, p+_strlen(p)).concat(addZero ? [0] : []); } // stdlib.h |