Skip to content

Commit

Permalink
memory_instance_getptr2: remove unnnecessary calculation
Browse files Browse the repository at this point in the history
fixes #261
  • Loading branch information
yamt committed Sep 13, 2024
1 parent 76a3019 commit e2de1e3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/exec_insn_subr.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ memory_instance_getptr2(struct meminst *meminst, uint32_t ptr, uint32_t offset,
}
goto success;
}
uint32_t last_byte = ea + (size - 1);
uint32_t last_byte;
if (ADD_U32_OVERFLOW(ea, size - 1, &last_byte)) {
goto do_trap;
}
Expand Down

0 comments on commit e2de1e3

Please sign in to comment.