summaryrefslogtreecommitdiff
path: root/src/dged/text.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/dged/text.c')
-rw-r--r--src/dged/text.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dged/text.c b/src/dged/text.c
index 82c49bc..3d1078f 100644
--- a/src/dged/text.c
+++ b/src/dged/text.c
@@ -389,8 +389,8 @@ void text_delete(struct text *text, uint32_t start_line, uint32_t start_col,
// in this case we can "overwrite"
uint32_t dstbytei =
utf8_nbytes(firstline->data, firstline->nbytes, start_col);
- memcpy(firstline->data + dstbytei, lastline->data + bytei,
- lastline->nbytes - bytei);
+ memmove(firstline->data + dstbytei, lastline->data + bytei,
+ lastline->nbytes - bytei);
} else {
// otherwise we actually have to copy from the last line
insert_at(text, start_line, start_col, lastline->data + bytei,