mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Fix bug in ctx_set_local_type()
This commit is contained in:
parent
6164274c76
commit
53ff2d791d
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue