diff options
author | Maxime Chevalier-Boisvert <maxime.chevalierboisvert@shopify.com> | 2021-04-09 14:48:02 -0400 |
---|---|---|
committer | Alan Wu <XrXr@users.noreply.github.com> | 2021-10-20 18:19:33 -0400 |
commit | 53ff2d791d5e2c303a61d5873bcd03007366be88 (patch) | |
tree | ecac653dc83d5bab36879a26c6d11a39ea2484c7 /yjit_core.c | |
parent | 6164274c76d31bc447a92c59c8d277670a93f229 (diff) |
Fix bug in ctx_set_local_type()
Diffstat (limited to 'yjit_core.c')
-rw-r--r-- | yjit_core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/yjit_core.c b/yjit_core.c index 9469616947..68d4f976a3 100644 --- a/yjit_core.c +++ b/yjit_core.c @@ -202,7 +202,7 @@ Set the type of a local variable */ void ctx_set_local_type(ctx_t* ctx, size_t idx, val_type_t type) { - if (ctx->stack_size > MAX_LOCAL_TYPES) + if (idx >= MAX_LOCAL_TYPES) return; ctx->local_types[idx] = type; |