diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-04-27 19:47:54 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-04-29 13:02:32 -0700 |
commit | c0db96243a996dcea6c087176746effbcd60e5cf (patch) | |
tree | ade4f700e114208a9e7427ea601cef04ca553b48 | |
parent | 466437a416eca47d432ec0004e11f4692b1d5bda (diff) |
fix handling of empty structs
-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 5b12241e..d023d409 100644 --- a/src/runtime.js +++ b/src/runtime.js @@ -181,7 +181,7 @@ var Runtime = { #if TARGET_LE32 if (type == 'i64' || type == 'double') return 8; #endif - return Math.min(size || Runtime.getNativeFieldSize(type), Runtime.QUANTUM_SIZE); + return Math.min(size || (type ? Runtime.getNativeFieldSize(type) : 0), Runtime.QUANTUM_SIZE); }, // Calculate aligned size, just like C structs should be. TODO: Consider |