summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/core/line-split.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/line-split.c b/src/core/line-split.c
index 18f31425..9d4c0ab0 100644
--- a/src/core/line-split.c
+++ b/src/core/line-split.c
@@ -107,8 +107,8 @@ int line_split(const char *data, int len, char **output, LINEBUF_REC **buffer)
rec = *buffer;
if (rec->remove > 0) {
- rec->len = rec->len - rec->remove;
- memcpy(rec->str, rec->str+rec->remove, rec->len);
+ rec->len -= rec->remove;
+ g_memmove(rec->str, rec->str+rec->remove, rec->len);
rec->remove = 0;
}