diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1999-02-05 10:27:34 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1999-02-05 10:27:34 +0000 |
commit | 9b64dfe3b8f0343ebf97ae80d3a4ec3f4bd115b3 (patch) | |
tree | 7acd7b77321fdbc63149b47fde3bace6f7733614 /string.c | |
parent | 06d4e3b42d836b762c29cdc9dc7181caf14dcdec (diff) |
990205
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_3@391 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
-rw-r--r-- | string.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1140,7 +1140,7 @@ rb_str_gsub_bang(argc, argv, str) } if (RSTRING(str)->len > offset) { len = bp - buf; - if (blen - len < RSTRING(str)->len - offset) { + if (blen - len < RSTRING(str)->len - offset + 1) { REALLOC_N(buf, char, len + RSTRING(str)->len - offset + 1); bp = buf + len; } |