* string.c (rb_str_drop_bytes): use memmove.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18645 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
7f0c5beb6f
commit
a98587c0fd
@ -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>
|
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.
|
* include/ruby/encoding.h (rb_econv_t): add error_tc in last_error.
|
||||||
|
2
string.c
2
string.c
@ -2836,7 +2836,7 @@ rb_str_drop_bytes(VALUE str, long len)
|
|||||||
STR_SET_EMBED(str);
|
STR_SET_EMBED(str);
|
||||||
STR_SET_EMBED_LEN(str, nlen);
|
STR_SET_EMBED_LEN(str, nlen);
|
||||||
ptr = RSTRING(str)->as.ary;
|
ptr = RSTRING(str)->as.ary;
|
||||||
memcpy(ptr, oldptr + len, nlen);
|
memmove(ptr, oldptr + len, nlen);
|
||||||
if (fl == STR_NOEMBED) xfree(oldptr);
|
if (fl == STR_NOEMBED) xfree(oldptr);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user