summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--string.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 30436afb06..fa640f8cf9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Fri Aug 15 19:33:57 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * string.c (rb_str_drop_bytes): use memmove.
+
Fri Aug 15 18:33:22 2008 Tanaka Akira <akr@fsij.org>
* include/ruby/encoding.h (rb_econv_t): add error_tc in last_error.
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 {