Skip to content

Commit

Permalink
memory_getptr2: fix an assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
yamt committed Jul 26, 2024
1 parent 89020cf commit 9d13653
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 @@ -45,7 +45,7 @@ memory_getptr2(struct exec_context *ctx, uint32_t memidx, uint32_t ptr,
uint32_t offset, uint32_t size, void **pp, bool *movedp)
{
const struct instance *inst = ctx->instance;
assert(memidx < inst->module->nmems);
assert(memidx < inst->module->nmems + inst->module->nimportedmems);
struct meminst *meminst = VEC_ELEM(inst->mems, memidx);
assert(meminst->allocated <=
(uint64_t)meminst->size_in_pages
Expand Down

0 comments on commit 9d13653

Please sign in to comment.