diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-12-10 07:48:48 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-12-10 07:48:48 +0000 |
commit | c77efe114476e3fd5a1d66cba12ad65c7a1bf40e (patch) | |
tree | 33a9ad073cf0b10b580dbfef35d55406fe6e1f29 /string.c | |
parent | 0c50d7ba1511cb89e7dd51e6f270725f07012a5b (diff) | |
download | ruby-c77efe114476e3fd5a1d66cba12ad65c7a1bf40e.tar.gz |
string.c: term fill
* string.c (rb_str_chomp_bang): fill wchar terminator.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48760 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
-rw-r--r-- | string.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -7188,7 +7188,7 @@ rb_str_chomp_bang(int argc, VALUE *argv, VALUE str) len = chompped_length(str, rs); if (len < olen) { STR_SET_LEN(str, len); - RSTRING_PTR(str)[len] = '\0'; + TERM_FILL(&RSTRING_PTR(str)[len], TERM_LEN(str)); if (ENC_CODERANGE(str) != ENC_CODERANGE_7BIT) { ENC_CODERANGE_CLEAR(str); } |