diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-01-06 17:14:12 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2021-01-06 17:14:12 +0900 |
| commit | 8e048ae25db2c00e983bb75f915058844a50c0cb (patch) | |
| tree | 4dbf22f15e482bf082712286bcf0daa5e51aa41c /src/debug.c | |
| parent | 1341e53961b3e99ac67d803e5ead677e976d18c4 (diff) | |
| parent | 74c9502bd45fd70926c86ce564c2d5d1df9a6dd0 (diff) | |
| download | mruby-8e048ae25db2c00e983bb75f915058844a50c0cb.tar.gz mruby-8e048ae25db2c00e983bb75f915058844a50c0cb.zip | |
Merge branch 'shuujii-improve-source-scanning-for-presym'
Diffstat (limited to 'src/debug.c')
| -rw-r--r-- | src/debug.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/debug.c b/src/debug.c index c03c91cf5..2f9320ac9 100644 --- a/src/debug.c +++ b/src/debug.c @@ -66,7 +66,7 @@ mrb_debug_get_filename(mrb_state *mrb, const mrb_irep *irep, uint32_t pc) MRB_API int32_t mrb_debug_get_line(mrb_state *mrb, const mrb_irep *irep, uint32_t pc) { - if (irep && pc < irep->ilen) { + if (irep && pc >= 0 && pc < irep->ilen) { mrb_irep_debug_info_file* f = NULL; if (!irep->debug_info) { return -1; |
