summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-10-02 07:48:42 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-10-02 07:48:42 +0000
commit9a46002fc01b1b874d768b2e8372b725a9e8b298 (patch)
tree9e3660449780967673d6a687f00329710e899537 /string.c
parent173e2f6636701f7657a0acb3dcba33e9d66b562d (diff)
matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@985 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
-rw-r--r--string.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/string.c b/string.c
index 40207e5ba4..ff9e6bd0c2 100644
--- a/string.c
+++ b/string.c
@@ -1797,7 +1797,7 @@ trnext(t)
if (!t->gen) {
if (t->p == t->pend) return -1;
t->now = *(USTR)t->p++;
- if (t->p < t->pend && *t->p == '-') {
+ if (t->p < t->pend - 1 && *t->p == '-') {
t->p++;
if (t->p < t->pend) {
if (t->now > *(USTR)t->p) {