summaryrefslogtreecommitdiff
path: root/ext/ffi
diff options
context:
space:
mode:
Diffstat (limited to 'ext/ffi')
-rw-r--r--ext/ffi/00_ffi.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/ext/ffi/00_ffi.js b/ext/ffi/00_ffi.js
index c7ca21975..3664ae73b 100644
--- a/ext/ffi/00_ffi.js
+++ b/ext/ffi/00_ffi.js
@@ -313,8 +313,9 @@ function getTypeSizeAndAlignment(type, cache = new SafeMap()) {
size += fieldSize;
}
size = MathCeil(size / alignment) * alignment;
- cache.set(type, size);
- return [size, alignment];
+ const result = [size, alignment];
+ cache.set(type, result);
+ return result;
}
switch (type) {