summaryrefslogtreecommitdiff
path: root/py/objstr.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-08-29 21:07:54 +0100
committerDamien George <damien.p.george@gmail.com>2014-08-29 21:07:54 +0100
commit17ae2395c24544a8263ecf1e88572a571325a1ec (patch)
treea78af85601754957b4d9f4d13970be756c619d4b /py/objstr.c
parent02d95d7ce9e12afa890b5ffb6a4d92fb593687ff (diff)
py: Use memmove instead of memcpy when appropriate.
Found this bug by running unix/ tests with DEBUG=1 enabled when compiling.
Diffstat (limited to 'py/objstr.c')
-rw-r--r--py/objstr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/py/objstr.c b/py/objstr.c
index 366ba8816..fd4bc8289 100644
--- a/py/objstr.c
+++ b/py/objstr.c
@@ -567,7 +567,7 @@ STATIC mp_obj_t str_rsplit(uint n_args, const mp_obj_t *args) {
if (idx != 0) {
// We split less parts than split limit, now go cleanup surplus
int used = org_splits + 1 - idx;
- memcpy(res->items, &res->items[idx], used * sizeof(mp_obj_t));
+ memmove(res->items, &res->items[idx], used * sizeof(mp_obj_t));
mp_seq_clear(res->items, used, res->alloc, sizeof(*res->items));
res->len = used;
}