From 3ae8b115c2fad3ed71209ff56813fff2e4a8ad3b Mon Sep 17 00:00:00 2001 From: Alan Wu Date: Mon, 3 Jan 2022 12:43:23 -0500 Subject: YJIT: Fix confusing self reference when initializing variable --- yjit_codegen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'yjit_codegen.c') diff --git a/yjit_codegen.c b/yjit_codegen.c index 33c1ec6539..aa352dac70 100644 --- a/yjit_codegen.c +++ b/yjit_codegen.c @@ -1330,7 +1330,7 @@ slot_to_local_idx(const rb_iseq_t *iseq, int32_t slot_idx) // FIXME: unsigned to signed cast below can truncate int32_t local_table_size = iseq->body->local_table_size; int32_t op = slot_idx - VM_ENV_DATA_SIZE; - int32_t local_idx = local_idx = local_table_size - op - 1; + int32_t local_idx = local_table_size - op - 1; RUBY_ASSERT(local_idx >= 0 && local_idx < local_table_size); return (uint32_t)local_idx; } -- cgit v1.2.3