diff options
author | Alon Zakai <alonzakai@gmail.com> | 2011-04-16 16:35:08 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2011-04-16 16:35:08 -0700 |
commit | b48fb4d83121ee776cce12a7be43afed7332bd7d (patch) | |
tree | 7385ab05f2380e194ed0236624d20253c0fc20f5 /src/runtime.js | |
parent | 11420a30683911e32c14dcf8286d4b256462b351 (diff) |
proper support for packed structs
Diffstat (limited to 'src/runtime.js')
-rw-r--r-- | src/runtime.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/runtime.js b/src/runtime.js index acd5ed8d..6c3d630c 100644 --- a/src/runtime.js +++ b/src/runtime.js @@ -113,7 +113,7 @@ Runtime = { dprint('Unclear type in struct: ' + field + ', in ' + type.name_); assert(0); } - alignSize = Math.min(alignSize, QUANTUM_SIZE); + alignSize = type.packed ? 1 : Math.min(alignSize, QUANTUM_SIZE); type.alignSize = Math.max(type.alignSize, alignSize); var curr = Runtime.alignMemory(type.flatSize, alignSize); // if necessary, place this on aligned memory type.flatSize = curr + size; |