aboutsummaryrefslogtreecommitdiff
path: root/src/embind/emval.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/embind/emval.js')
-rw-r--r--src/embind/emval.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/embind/emval.js b/src/embind/emval.js
index f6f0f343..535b5d57 100644
--- a/src/embind/emval.js
+++ b/src/embind/emval.js
@@ -139,7 +139,8 @@ function craftEmvalAllocator(argCount) {
for(var i = 0; i < argCount; ++i) {
functionBody +=
"var argType"+i+" = requireRegisteredType(HEAP32[(argTypes >> 2) + "+i+"], \"parameter "+i+"\");\n" +
- "var arg"+i+" = argType"+i+".readValueFromPointer(args + " + i * 8 + ");\n";
+ "var arg"+i+" = argType"+i+".readValueFromPointer(args);\n" +
+ "args += argType"+i+".varArgAdvance;\n";
}
functionBody +=
"var obj = new constructor("+argsList+");\n" +