aboutsummaryrefslogtreecommitdiffstats
path: root/string.c
diff options
context:
space:
mode:
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;