diff options
author | kripken <alonzakai@gmail.com> | 2011-06-23 18:13:57 -0700 |
---|---|---|
committer | kripken <alonzakai@gmail.com> | 2011-06-23 18:13:57 -0700 |
commit | 7384e06cbdba01d4cfa83d2d770c5b4e82767e69 (patch) | |
tree | 0925904e3d7770eebba82ed43d0135b111df9741 /src/preamble.js | |
parent | 866f54c895f16de3c439efda9e15956019c7771b (diff) | |
parent | ad7d02cd33e85c656b5b1f5bdef933890bae739d (diff) |
Merge pull request #26 from timdawborn/master
Various fixes to IO stubs
Diffstat (limited to 'src/preamble.js')
-rw-r--r-- | src/preamble.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/preamble.js b/src/preamble.js index 8cf87bfd..b5a8930a 100644 --- a/src/preamble.js +++ b/src/preamble.js @@ -549,7 +549,7 @@ function jrint(label, obj) { // XXX manual debugging // This processes a JS string into a C-line array of numbers, 0-terminated. // For LLVM-originating strings, see parser.js:parseLLVMString function -function intArrayFromString(stringy) { +function intArrayFromString(stringy, dontAddNull) { var ret = []; var t; var i = 0; @@ -557,7 +557,8 @@ function intArrayFromString(stringy) { ret.push(stringy.charCodeAt(i)); i = i + 1; } - ret.push(0); + if (!dontAddNull) + ret.push(0); return ret; } Module['intArrayFromString'] = intArrayFromString; |