From 372fb44a395d6ded38d6e52472a0f2f330c232c3 Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Sun, 29 Mar 2020 18:08:40 +0200 Subject: [PATCH] Fix buffer resizing. --- utcp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utcp.c b/utcp.c index b5102dd..3d0971a 100644 --- a/utcp.c +++ b/utcp.c @@ -220,7 +220,7 @@ static bool buffer_resize(struct buffer *buf, uint32_t newsize) { // [345.........|........012] uint32_t tailsize = buf->size - buf->offset; uint32_t newoffset = newsize - tailsize; - memmove(buf + newoffset, buf + buf->offset, tailsize); + memmove(buf->data + newoffset, buf->data + buf->offset, tailsize); buf->offset = newoffset; } -- 2.39.5