aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/jsifier.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/jsifier.js b/src/jsifier.js
index a583da1e..88f86d5b 100644
--- a/src/jsifier.js
+++ b/src/jsifier.js
@@ -311,9 +311,12 @@ function JSify(data, functionsOnly, givenFunctions) {
if (!LibraryManager.library[item.ident.slice(1)]) return ret;
}
+ // ensure alignment
+ constant = constant.concat(zeros(Runtime.alignMemory(constant.length) - constant.length));
+
// Special case: class vtables. We make sure they are null-terminated, to allow easy runtime operations
if (item.ident.substr(0, 5) == '__ZTV') {
- constant = constant.concat(zeros(Runtime.alignMemory(constant.length + QUANTUM_SIZE) - constant.length));
+ constant = constant.concat(zeros(Runtime.alignMemory(QUANTUM_SIZE)));
}
// NOTE: This is the only place that could potentially create static