summaryrefslogtreecommitdiffhomepage
path: root/src/debug.c
diff options
context:
space:
mode:
authortake_cheeze <[email protected]>2013-09-04 12:05:49 +0900
committertake_cheeze <[email protected]>2013-09-04 12:05:49 +0900
commit157a5529c5b9998933c22d916ec31aa1e11b6aaa (patch)
tree8a7be66afc93e17904e6e2c022aa1cfc3c0543aa /src/debug.c
parent872f76e68e2e9b882450ab42b70f579211025869 (diff)
downloadmruby-157a5529c5b9998933c22d916ec31aa1e11b6aaa.tar.gz
mruby-157a5529c5b9998933c22d916ec31aa1e11b6aaa.zip
check returning line entry pointer is greater or equal to the first line entry pointer
Diffstat (limited to 'src/debug.c')
-rw-r--r--src/debug.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/debug.c b/src/debug.c
index a521a5fe6..6e414674b 100644
--- a/src/debug.c
+++ b/src/debug.c
@@ -89,7 +89,7 @@ mrb_debug_get_line(mrb_irep* irep, uint32_t const pc)
--ret;
- mrb_assert((ret - f->line_flat_map) < f->line_entry_count);
+ mrb_assert(f->line_flat_map <= ret && ret < (f->line_flat_map + f->line_entry_count));
mrb_assert(ret->start_pos <= pc &&
pc < (((ret + 1 - f->line_flat_map) < f->line_entry_count)
? (ret+1)->start_pos : irep->debug_info->pc_count));