summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Thurston <thurston@colm.net>2020-01-05 12:40:45 +0200
committerAdrian Thurston <thurston@colm.net>2020-01-05 15:27:22 +0200
commitb7d81045dbc574995947fd2607f250f11c950da6 (patch)
tree01228c6f65e105d6c4cff1ac101338a42fa9873c
parentce07bb4538ad2ddf0a3b7c62b0a04bbf0b687d21 (diff)
downloadragel-b7d81045dbc574995947fd2607f250f11c950da6.tar.gz
fixed the variable capture in read_word on 32 bit systems
refs #97
-rw-r--r--colm/bytecode.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/colm/bytecode.c b/colm/bytecode.c
index 6f4d0b5d..6bb9be1f 100644
--- a/colm/bytecode.c
+++ b/colm/bytecode.c
@@ -56,12 +56,12 @@
#if SIZEOF_LONG == 4
#define read_type( type, i ) do { \
- word_t w; \
- w = ((word_t) *instr++); \
- w |= ((word_t) *instr++) << 8; \
- w |= ((word_t) *instr++) << 16; \
- w |= ((word_t) *instr++) << 24; \
- i = (type) w; \
+ word_t _w; \
+ _w = ((word_t) *instr++); \
+ _w |= ((word_t) *instr++) << 8; \
+ _w |= ((word_t) *instr++) << 16; \
+ _w |= ((word_t) *instr++) << 24; \
+ i = (type) _w; \
} while(0)
#define read_type_p( Type, i, p ) do { \