summaryrefslogtreecommitdiff
path: root/string.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-12-11 00:37:58 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-12-11 00:37:58 +0000
commit5c100b57f8c2f2513b0cf975d51b44b93a131070 (patch)
tree1a3983d6267824737760202f49b523aa19fd36ef /string.c
parent0eebb8f1c0833b4897cfe2e5eb578951e86f88dd (diff)
string.c: term fill
* string.c (rb_str_squeeze_bang): fill wchar terminator. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48768 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 d82051d25f..6b3b61c9e9 100644
--- a/string.c
+++ b/string.c
@@ -6076,7 +6076,7 @@ rb_str_squeeze_bang(int argc, VALUE *argv, VALUE str)
}
}
- *t = '\0';
+ TERM_FILL(t, TERM_LEN(str));
if (t - RSTRING_PTR(str) != RSTRING_LEN(str)) {
STR_SET_LEN(str, t - RSTRING_PTR(str));
modify = 1;