From 53ff2d791d5e2c303a61d5873bcd03007366be88 Mon Sep 17 00:00:00 2001 From: Maxime Chevalier-Boisvert Date: Fri, 9 Apr 2021 14:48:02 -0400 Subject: Fix bug in ctx_set_local_type() --- yjit_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'yjit_core.c') 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; -- cgit v1.2.3