diff options
author | max99x <max99x@gmail.com> | 2011-06-24 04:10:34 +0300 |
---|---|---|
committer | max99x <max99x@gmail.com> | 2011-06-24 04:10:34 +0300 |
commit | 5fa86f5cf902f6b1ae2acb31c71cd23813b720dd (patch) | |
tree | 39cf7b90fc32e57147ea421178d7e7074347bb52 /src/preamble.js | |
parent | de4df59da644e1281d06224d7c0c32b2906cf780 (diff) | |
parent | 7384e06cbdba01d4cfa83d2d770c5b4e82767e69 (diff) |
Merge remote-tracking branch 'upstream/master'
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; |