diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2013-09-07 09:50:02 -0700 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2013-09-07 09:50:02 -0700 |
| commit | 668a0466c551c5a04c1156f4597971f9e183d424 (patch) | |
| tree | e98fb94d811819dc4be49a2f0affc41272328db2 /src/debug.c | |
| parent | 385e5d6e831e0de76a44e736340bcb867df1d1a6 (diff) | |
| parent | af73a740cdf7099bb25204d394e51275ad90db2d (diff) | |
| download | mruby-668a0466c551c5a04c1156f4597971f9e183d424.tar.gz mruby-668a0466c551c5a04c1156f4597971f9e183d424.zip | |
Merge pull request #1500 from take-cheeze/debug_info_file_updating
Fix insufficient preparation to call mrb_debug_info_append_file.
Diffstat (limited to 'src/debug.c')
| -rw-r--r-- | src/debug.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/debug.c b/src/debug.c index 7902c09ba..8e4311f6c 100644 --- a/src/debug.c +++ b/src/debug.c @@ -73,8 +73,8 @@ mrb_debug_get_line(mrb_irep *irep, uint32_t pc) else if ((f = get_file(irep->debug_info, pc))) { switch(f->line_type) { case mrb_debug_line_ary: - mrb_assert(pc < (f->start_pos + f->line_entry_count)); - return f->line_ary[pc]; + mrb_assert(f->start_pos <= pc && pc < (f->start_pos + f->line_entry_count)); + return f->line_ary[pc - f->start_pos]; case mrb_debug_line_flat_map: { // get upper bound |
