diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-07-21 14:54:51 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-07-21 14:54:51 +0000 |
commit | 414ac300d602927a605327ddaf0fab36ab4f5d21 (patch) | |
tree | 3eded932ba4698c4df77609979762d50bd06311f | |
parent | 522e44934238e8f3357166bdefafd10eff69ed6e (diff) | |
download | ruby-414ac300d602927a605327ddaf0fab36ab4f5d21.tar.gz ruby-414ac300d602927a605327ddaf0fab36ab4f5d21.tar.xz ruby-414ac300d602927a605327ddaf0fab36ab4f5d21.zip |
* string.c (rb_str_resize): fix indent.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@12834 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | string.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -719,7 +719,7 @@ rb_str_resize(VALUE str, long len) MEMCPY(ptr, RSTRING_PTR(str), char, RSTRING_LEN(str)); RSTRING(str)->as.heap.ptr = ptr; STR_SET_NOEMBED(str); - } + } else if (RSTRING_LEN(str) < len || RSTRING_LEN(str) - len > 1024) { REALLOC_N(RSTRING(str)->as.heap.ptr, char, len+1); } |