diff options
Diffstat (limited to 'src/string.c')
| -rw-r--r-- | src/string.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/string.c b/src/string.c index c9fac896d..c000a9d7c 100644 --- a/src/string.c +++ b/src/string.c @@ -2583,7 +2583,8 @@ mrb_str_upcase_bang(mrb_state *mrb, mrb_value str) char *s, *send; int modify = 0; - s = RSTRING(str)->buf; send = s + RSTRING(str)->len; + s = RSTRING_PTR(str); + send = RSTRING_END(str); while (s < send) { if (ISLOWER(*s)) { *s = toupper(*s); |
