aboutsummaryrefslogtreecommitdiffstats
path: root/src/bytecode/debug.h
diff options
context:
space:
mode:
authorBad Diode <bd@badd10de.dev>2021-10-27 15:15:04 +0200
committerBad Diode <bd@badd10de.dev>2021-10-27 15:15:04 +0200
commit67f0debc923dc97fd79554678435f113c9f761d1 (patch)
tree44bba6613ace1d42e6eaf6befe586e37921f65aa /src/bytecode/debug.h
parent9460f325d22fac3962a3452ce25a24b04d22e665 (diff)
downloadbdl-67f0debc923dc97fd79554678435f113c9f761d1.tar.gz
bdl-67f0debc923dc97fd79554678435f113c9f761d1.zip
Fix an issue with reading local variables when nested
Diffstat (limited to 'src/bytecode/debug.h')
-rwxr-xr-xsrc/bytecode/debug.h5
1 files changed, 0 insertions, 5 deletions
diff --git a/src/bytecode/debug.h b/src/bytecode/debug.h
index e2e3756..e34b65f 100755
--- a/src/bytecode/debug.h
+++ b/src/bytecode/debug.h
@@ -77,11 +77,6 @@ disassemble_instruction(Chunk *chunk, size_t offset) {
77 } 77 }
78 u8 instruction = chunk->code[offset]; 78 u8 instruction = chunk->code[offset];
79 switch (instruction) { 79 switch (instruction) {
80 case OP_LOCAL: {
81 u8 local = chunk->code[offset + 1];
82 printf("%-16s %4d\n", ops_str[instruction], local);
83 return offset + 2;
84 } break;
85 case OP_CONSTANT: { 80 case OP_CONSTANT: {
86 u8 constant = chunk->code[offset + 1]; 81 u8 constant = chunk->code[offset + 1];
87 printf("%-16s %4d -> ", ops_str[instruction], constant); 82 printf("%-16s %4d -> ", ops_str[instruction], constant);