summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authortake_cheeze <[email protected]>2013-09-07 20:17:39 +0900
committertake_cheeze <[email protected]>2013-09-07 20:17:39 +0900
commit10fecc237573b1d3ed81e8d355401dab4deb19bd (patch)
tree825e5139beb66c713be0d2af8fea273431fd2760 /src
parent385e5d6e831e0de76a44e736340bcb867df1d1a6 (diff)
downloadmruby-10fecc237573b1d3ed81e8d355401dab4deb19bd.tar.gz
mruby-10fecc237573b1d3ed81e8d355401dab4deb19bd.zip
fix line getting handler of line_ary
Diffstat (limited to 'src')
-rw-r--r--src/debug.c4
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