diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-04-04 15:55:46 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-04-04 15:55:46 -0700 |
commit | 4fbbfb2d27b64a3eb96851e60d453d59e1e2d6a0 (patch) | |
tree | f8bccb7a9569e9bfcd10df6608e5e463ca581de6 /src/parseTools.js | |
parent | 538b6b0bcc12c58d841fd11130a9b16cfaf3d81e (diff) |
make sure allocate() types have the same length as the slab
Diffstat (limited to 'src/parseTools.js')
-rw-r--r-- | src/parseTools.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/parseTools.js b/src/parseTools.js index 95dc46e0..cec9afb3 100644 --- a/src/parseTools.js +++ b/src/parseTools.js @@ -1569,6 +1569,9 @@ function makePointer(slab, pos, allocator, type, ptr, finalMemoryInitialization) if (typeof slab == 'object' && slab.length > chunkSize) { slab = chunkify(slab); } + if (typeof types == 'object') { + while (types.length < slab.length) types.push(0); + } if (typeof types != 'string' && types.length > chunkSize) { types = chunkify(types); } else { |