diff options
author | Jesse Luehrs <doy@tozt.net> | 2017-07-19 01:57:57 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2017-07-19 01:57:57 -0400 |
commit | e836835edffcc7cbc44fd411b6cd7e447fc72c8e (patch) | |
tree | 0ed21b6a256d874ca56d6dc67e030f6d5b7c5a8b /examples | |
parent | 5fb4601b8b53a984a8e63a882e566d74b32e9d9d (diff) | |
download | libvt100-e836835edffcc7cbc44fd411b6cd7e447fc72c8e.tar.gz libvt100-e836835edffcc7cbc44fd411b6cd7e447fc72c8e.zip |
fix some miscalculations in the example binary
Diffstat (limited to 'examples')
-rw-r--r-- | examples/test1.c | 4 |
1 files 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; } } |