From c42412e1643c88c81cf5b38404cc010881437fe9 Mon Sep 17 00:00:00 2001 From: Albert Cervin Date: Mon, 29 Apr 2024 11:03:47 +0200 Subject: OpenBSD port work --- src/dged/text.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/dged/text.c') 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, -- cgit v1.2.3