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 75b6b1ec63..10ac53b96c 100644
--- a/string.c
+++ b/string.c
@@ -2836,7 +2836,7 @@ rb_str_drop_bytes(VALUE str, long len)
STR_SET_EMBED(str);
STR_SET_EMBED_LEN(str, nlen);
ptr = RSTRING(str)->as.ary;
- memcpy(ptr, oldptr + len, nlen);
+ memmove(ptr, oldptr + len, nlen);
if (fl == STR_NOEMBED) xfree(oldptr);
}
else {