Remove positive check for unsigned integer; close #5218

This commit is contained in:
Yukihiro "Matz" Matsumoto
2020-12-12 18:25:47 +09:00
parent 092dd4a667
commit 116e128b1a
+1 -1
View File
@@ -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;