summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-12-10 07:48:34 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-12-10 07:48:34 +0000
commitc00aca4aa0ccff7a579f5c711a04c495903b52e1 (patch)
tree7969ad15715ed4fd13e080fb28cd7c8e058fcbc4 /string.c
parentb890ed926a7a2df848011208797551886acf5f53 (diff)
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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/string.c b/string.c
index 5cb7233637..44a8c28812 100644
--- a/string.c
+++ b/string.c
@@ -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);