summaryrefslogtreecommitdiff
path: root/debug.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-06-06 12:30:17 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-06-06 12:30:17 (GMT)
commit95af3295cc6804e0c44f50f50b1aedf5d0c5ffcf (patch)
treea52048beb640dbc83b8642922ba352365c1a26b3 /debug.c
parent267323cad5ca4888dae11c9e08ccef175f7d72c7 (diff)
debug.c: fix breaking condtions
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59027 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'debug.c')
-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;
}