diff options
Diffstat (limited to 'string.c')
-rw-r--r-- | string.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1011,8 +1011,8 @@ rb_str_succ(orig) sbeg = RSTRING(str)->ptr; s = sbeg + RSTRING(str)->len - 1; c = '\001'; while (sbeg <= s) { - *s += 1; - if (*s-- != 0) break; + if ((*s += 1) != 0) break; + s--; } } if (s < sbeg) { |