diff options
Diffstat (limited to 'src/parseTools.js')
-rw-r--r-- | src/parseTools.js | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/parseTools.js b/src/parseTools.js index a3b6f79c..5459fc67 100644 --- a/src/parseTools.js +++ b/src/parseTools.js @@ -1533,14 +1533,16 @@ function makePointer(slab, pos, allocator, type, ptr, finalMemoryInitialization) } } } else { // USE_TYPED_ARRAYS == 2 - // XXX This heavily assumes the target endianness is the same as our current endianness! XXX - var i = 0; - while (i < slab.length) { - var currType = types[i]; - if (!currType) { i++; continue } - i += writeInt8s(slab, i, slab[i], currType); + if (!finalMemoryInitialization) { + // XXX This heavily assumes the target endianness is the same as our current endianness! XXX + var i = 0; + while (i < slab.length) { + var currType = types[i]; + if (!currType) { i++; continue } + i += writeInt8s(slab, i, slab[i], currType); + } + types = 'i8'; } - types = 'i8'; } if (allocator == 'ALLOC_NONE' && USE_TYPED_ARRAYS == 2) { if (!finalMemoryInitialization) { |