From 4969326cd692600195af7ac4902f501aed588fea Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Wed, 6 Sep 2000 21:54:53 +0000 Subject: [PATCH] line_split() : use g_memmove() instead of memcpy() .. hm. how could this even work before? :) git-svn-id: http://svn.irssi.org/repos/irssi/trunk@650 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/core/line-split.c | 4 ++-- 1 file 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; }