summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2020-12-12 18:25:47 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2020-12-12 18:25:47 +0900
commit116e128b1a103e2fb246cc9d53b82246b24dbd40 (patch)
tree3d84c99922bcbb08f3cb828d40ce4b8f7d462cba /src
parent092dd4a667175a123ef9b628e7008be6398d7e0e (diff)
downloadmruby-116e128b1a103e2fb246cc9d53b82246b24dbd40.tar.gz
mruby-116e128b1a103e2fb246cc9d53b82246b24dbd40.zip
Remove positive check for unsigned integer; close #5218
Diffstat (limited to 'src')
-rw-r--r--src/debug.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/debug.c b/src/debug.c
index 2f9320ac9..c03c91cf5 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 >= 0 && pc < irep->ilen) {
+ if (irep && pc < irep->ilen) {
mrb_irep_debug_info_file* f = NULL;
if (!irep->debug_info) {
return -1;