diff options
author | Alan Wu <alanwu@ruby-lang.org> | 2022-01-03 12:43:23 -0500 |
---|---|---|
committer | Alan Wu <alanwu@ruby-lang.org> | 2022-01-03 12:43:23 -0500 |
commit | 3ae8b115c2fad3ed71209ff56813fff2e4a8ad3b (patch) | |
tree | bf2093745c94055a8c5abe55d7fc68ee0b938492 /yjit_codegen.c | |
parent | c717728830500fcd47534faafd01362a29e90cfd (diff) |
YJIT: Fix confusing self reference when initializing variable
Diffstat (limited to 'yjit_codegen.c')
-rw-r--r-- | yjit_codegen.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; } |