summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debug.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/debug.c b/debug.c
index 392070a..090c644 100644
--- a/debug.c
+++ b/debug.c
@@ -154,10 +154,9 @@ set_debug_option(const char *str, int len, void *arg)
if (!ov && retlen) {
ruby_w32_codepage[i] = (UINT)n;
}
- if ((size_t)len <= retlen) break;
str += retlen;
len -= retlen;
- if (*str != ':') break;
+ if (!len || *str != ':') break;
++str;
--len;
}