Skip to content

Commit c672824

Browse files
committed
use proper separator in va_argHandler; fixes #1705
1 parent 74e4760 commit c672824

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/jsifier.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1375,7 +1375,7 @@ function JSify(data, functionsOnly, givenFunctions) {
13751375

13761376
// store current list offset in tempInt, advance list offset by STACK_ALIGN, return list entry stored at tempInt
13771377
return '(tempInt=' + makeGetValue(ident, Runtime.QUANTUM_SIZE, '*') + ',' +
1378-
makeSetValue(ident, Runtime.QUANTUM_SIZE, 'tempInt + ' + move, '*') + ',' +
1378+
makeSetValue(ident, Runtime.QUANTUM_SIZE, 'tempInt + ' + move, '*', null, null, null, null, ',') + ',' +
13791379
makeGetValue(makeGetValue(ident, 0, '*'), 'tempInt', item.type) + ')';
13801380
}
13811381

tests/test_other.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,13 +388,17 @@ class Test {
388388
def test_unaligned_memory(self):
389389
open(os.path.join(self.get_dir(), 'test.cpp'), 'w').write(r'''
390390
#include <stdio.h>
391+
#include <stdarg.h>
391392
392393
typedef unsigned char Bit8u;
393394
typedef unsigned short Bit16u;
394395
typedef unsigned int Bit32u;
395396
396397
int main()
397398
{
399+
va_list argp;
400+
va_arg(argp, char *); // check for compilation error, #1705
401+
398402
Bit8u data[4] = {0x01,0x23,0x45,0x67};
399403
400404
printf("data: %x\n", *(Bit32u*)data);

0 commit comments

Comments
 (0)