summaryrefslogtreecommitdiff
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 2fb67ef..d82051d 100644
--- a/string.c
+++ b/string.c
@@ -5971,7 +5971,7 @@ rb_str_delete_bang(int argc, VALUE *argv, VALUE str)
s += clen;
}
}
- *t = '\0';
+ TERM_FILL(t, TERM_LEN(str));
STR_SET_LEN(str, t - RSTRING_PTR(str));
ENC_CODERANGE_SET(str, cr);