diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-12-10 07:48:34 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-12-10 07:48:34 +0000 |
commit | c00aca4aa0ccff7a579f5c711a04c495903b52e1 (patch) | |
tree | 7969ad15715ed4fd13e080fb28cd7c8e058fcbc4 /string.c | |
parent | b890ed926a7a2df848011208797551886acf5f53 (diff) | |
download | ruby-c00aca4aa0ccff7a579f5c711a04c495903b52e1.tar.gz |
string.c: term fill
* string.c (rb_str_plus): fill wchar terminator.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48758 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'string.c')
-rw-r--r-- | string.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1455,7 +1455,7 @@ rb_str_plus(VALUE str1, VALUE str2) ptr3 = RSTRING_PTR(str3); memcpy(ptr3, ptr1, len1); memcpy(ptr3+len1, ptr2, len2); - ptr3[len1+len2] = '\0'; + TERM_FILL(&ptr3[len1+len2], rb_enc_mbminlen(enc)); if (OBJ_TAINTED(str1) || OBJ_TAINTED(str2)) OBJ_TAINT(str3); |