diff options
Diffstat (limited to 'iseq.c')
-rw-r--r-- | iseq.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1104,7 +1104,8 @@ cdhash_each(VALUE key, VALUE value, VALUE ary) static VALUE iseq_data_to_ary(rb_iseq_t *iseq) { - long i, ti; + long i; + size_t ti; unsigned int pos; unsigned int line = 0; VALUE *seq; @@ -1315,7 +1316,7 @@ iseq_data_to_ary(rb_iseq_t *iseq) rb_ary_push(body, (VALUE)label); } - if (iseq->line_info_table[ti].position == pos) { + if (iseq->line_info_size < ti && iseq->line_info_table[ti].position == pos) { line = iseq->line_info_table[ti].line_no; rb_ary_push(body, INT2FIX(line)); ti++; |