diff options
Diffstat (limited to 'src/preamble.js')
-rw-r--r-- | src/preamble.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/preamble.js b/src/preamble.js index 8e70cb74..acff665f 100644 --- a/src/preamble.js +++ b/src/preamble.js @@ -908,6 +908,17 @@ function writeArrayToMemory(array, buffer) { } Module['writeArrayToMemory'] = writeArrayToMemory; +function writeAsciiToMemory(str, buffer, dontAddNull) { + for (var i = 0; i < str.length; i++) { +#if ASSERTIONS + assert(str.charCodeAt(i) === str.charCodeAt(i)&0xff); +#endif + {{{ makeSetValue('buffer', 'i', 'str.charCodeAt(i)', 'i8') }}} + } + if (!dontAddNull) {{{ makeSetValue('buffer', 'str.length', 0, 'i8') }}} +} +Module['writeAsciiToMemory'] = writeAsciiToMemory; + {{{ unSign }}} {{{ reSign }}} |