Skip to content

Commit

Permalink
Fix negative 2-byte switch check.
Browse files Browse the repository at this point in the history
  • Loading branch information
dworkin committed Aug 22, 2024
1 parent 85f8d80 commit 5e67e62
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/interpret.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1459,7 +1459,7 @@ unsigned short Frame::switchInt(char *pc)
while (l < h) {
m = (l + h) >> 1;
p = pc + 4 * m;
FETCH2S(p, num);
num = FETCH2S(p, num);
if (sp->number == num) {
return FETCH2U(p, l);
} else if (sp->number < num) {
Expand Down

0 comments on commit 5e67e62

Please sign in to comment.