Remove positive check for unsigned integer; close #5218

parent 092dd4a6
...@@ -66,7 +66,7 @@ mrb_debug_get_filename(mrb_state *mrb, const mrb_irep *irep, uint32_t pc) ...@@ -66,7 +66,7 @@ mrb_debug_get_filename(mrb_state *mrb, const mrb_irep *irep, uint32_t pc)
MRB_API int32_t MRB_API int32_t
mrb_debug_get_line(mrb_state *mrb, const mrb_irep *irep, uint32_t pc) mrb_debug_get_line(mrb_state *mrb, const mrb_irep *irep, uint32_t pc)
{ {
if (irep && pc >= 0 && pc < irep->ilen) { if (irep && pc < irep->ilen) {
mrb_irep_debug_info_file* f = NULL; mrb_irep_debug_info_file* f = NULL;
if (!irep->debug_info) { if (!irep->debug_info) {
return -1; return -1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment