From e836835edffcc7cbc44fd411b6cd7e447fc72c8e Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Wed, 19 Jul 2017 01:57:57 -0400 Subject: fix some miscalculations in the example binary --- examples/test1.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/test1.c b/examples/test1.c index 849a41e..6db7665 100644 --- a/examples/test1.c +++ b/examples/test1.c @@ -28,8 +28,8 @@ int main(int argc, char *argv[]) parsed = vt100_screen_process_string(vt, buf, bytes + offset); if (parsed < bytes + offset) { - memcpy(buf, buf + parsed, bytes - parsed); - offset = bytes - parsed; + memmove(buf, buf + parsed, bytes + offset - parsed); + offset = bytes + offset - parsed; } } -- cgit v1.2.3-54-g00ecf