aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/jsifier.js2
-rw-r--r--tests/test_other.py4
2 files changed, 5 insertions, 1 deletions
diff --git a/src/jsifier.js b/src/jsifier.js
index f638ea08..e84de3ee 100644
--- a/src/jsifier.js
+++ b/src/jsifier.js
@@ -1375,7 +1375,7 @@ function JSify(data, functionsOnly, givenFunctions) {
// store current list offset in tempInt, advance list offset by STACK_ALIGN, return list entry stored at tempInt
return '(tempInt=' + makeGetValue(ident, Runtime.QUANTUM_SIZE, '*') + ',' +
- makeSetValue(ident, Runtime.QUANTUM_SIZE, 'tempInt + ' + move, '*') + ',' +
+ makeSetValue(ident, Runtime.QUANTUM_SIZE, 'tempInt + ' + move, '*', null, null, null, null, ',') + ',' +
makeGetValue(makeGetValue(ident, 0, '*'), 'tempInt', item.type) + ')';
}
diff --git a/tests/test_other.py b/tests/test_other.py
index 185b4853..c38a35d8 100644
--- a/tests/test_other.py
+++ b/tests/test_other.py
@@ -388,6 +388,7 @@ f.close()
def test_unaligned_memory(self):
open(os.path.join(self.get_dir(), 'test.cpp'), 'w').write(r'''
#include <stdio.h>
+ #include <stdarg.h>
typedef unsigned char Bit8u;
typedef unsigned short Bit16u;
@@ -395,6 +396,9 @@ f.close()
int main()
{
+ va_list argp;
+ va_arg(argp, char *); // check for compilation error, #1705
+
Bit8u data[4] = {0x01,0x23,0x45,0x67};
printf("data: %x\n", *(Bit32u*)data);