From: David ‘Bombe’ Roden Date: Sat, 5 Jul 2008 20:50:11 +0000 (+0200) Subject: move all remaining data X-Git-Tag: 0.1~20 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=670b52477447d711f0cf0d40be66838a87666717;p=ecparse.git move all remaining data --- diff --git a/GrowingBuffer.cpp b/GrowingBuffer.cpp index 3de12fc..2d26251 100644 --- a/GrowingBuffer.cpp +++ b/GrowingBuffer.cpp @@ -73,7 +73,7 @@ void GrowingBuffer::write(const void* buffer, size_t length) { void GrowingBuffer::cut() { GlobalSettings::isVerbose() && fprintf(stderr, "[%s:%d] discarding %d bytes, %d bytes remaining.\n", __FILE__, __LINE__, position, limit - position); - memcpy(data, (char*) data + position, position); + memmove(data, (char*) data + position, limit); limit -= position; position = 0; }