aboutsummaryrefslogtreecommitdiff
path: root/src/runtime.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-04-27 20:49:37 -0700
committerAlon Zakai <alonzakai@gmail.com>2013-04-29 13:02:33 -0700
commit013b20b472fb595b6b0ba2178a6d52694c9f46ea (patch)
tree7a91ea7e6df8df544e4965345282c17900fcb6ab /src/runtime.js
parent7c350b51637a31dd227c398a171a6667c67c8111 (diff)
fix sscanf, note that all varargs are 64-bit aligned
Diffstat (limited to 'src/runtime.js')
-rw-r--r--src/runtime.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/runtime.js b/src/runtime.js
index d023d409..db334669 100644
--- a/src/runtime.js
+++ b/src/runtime.js
@@ -176,10 +176,10 @@ var Runtime = {
STACK_ALIGN: {{{ STACK_ALIGN }}},
// type can be a native type or a struct (or null, for structs we only look at size here)
- getAlignSize: function(type, size) {
+ getAlignSize: function(type, size, vararg) {
// we align i64s and doubles on 64-bit boundaries, unlike x86
#if TARGET_LE32
- if (type == 'i64' || type == 'double') return 8;
+ if (type == 'i64' || type == 'double' || vararg) return 8;
#endif
return Math.min(size || (type ? Runtime.getNativeFieldSize(type) : 0), Runtime.QUANTUM_SIZE);
},