summaryrefslogtreecommitdiffstats
path: root/byterun/fix_code.c
diff options
context:
space:
mode:
Diffstat (limited to 'byterun/fix_code.c')
-rw-r--r--byterun/fix_code.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/byterun/fix_code.c b/byterun/fix_code.c
index 9c24de180..7cdff8e05 100644
--- a/byterun/fix_code.c
+++ b/byterun/fix_code.c
@@ -56,7 +56,13 @@ void thread_code(code, len, instr_table)
case GETGLOBALFIELD: case MAKEBLOCK: case C_CALLN:
p += 2; break;
/* Instructions with N+1 operands */
- case SWITCH: case TRANSLATE:
+ case SWITCH:
+ { uint32 sizes = *p++;
+ uint32 const_size = sizes & 0xFFFF;
+ uint32 block_size = sizes >> 16;
+ p += const_size + block_size;
+ break; }
+ case TRANSLATE:
p += *p + 1; break;
}
}