diff options
| author | Albert Cervin <albert@acervin.com> | 2024-04-29 11:03:47 +0200 |
|---|---|---|
| committer | Albert Cervin <albert@acervin.com> | 2024-05-06 11:05:30 +0200 |
| commit | c42412e1643c88c81cf5b38404cc010881437fe9 (patch) | |
| tree | 2650521affdaf0ba9c62f276514250f28af3129e /src/dged/text.c | |
| parent | c16a45eb19e436a558d2d8723fa4fda663ed3da8 (diff) | |
| download | dged-c42412e1643c88c81cf5b38404cc010881437fe9.tar.gz dged-c42412e1643c88c81cf5b38404cc010881437fe9.tar.xz dged-c42412e1643c88c81cf5b38404cc010881437fe9.zip | |
OpenBSD port work
Diffstat (limited to 'src/dged/text.c')
| -rw-r--r-- | src/dged/text.c | 4 |
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, |
