From ad734f341f1048050ec2e0b9b746f4f7ab542ce9 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Mon, 9 May 2016 07:44:05 -0400 Subject: [PATCH] Attempted fully to perfect `memove`, albeit that it's not affecting either current machine. --- Outputs/CRT/Internals/CRTInputBufferBuilder.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Outputs/CRT/Internals/CRTInputBufferBuilder.cpp b/Outputs/CRT/Internals/CRTInputBufferBuilder.cpp index 652a7db82..983b1f1ee 100644 --- a/Outputs/CRT/Internals/CRTInputBufferBuilder.cpp +++ b/Outputs/CRT/Internals/CRTInputBufferBuilder.cpp @@ -55,7 +55,7 @@ void CRTInputBufferBuilder::reduce_previous_allocation_to(size_t actual_length) // correct if the writing cursor was reset while a client was writing if(_next_write_x_position == 0 && _next_write_y_position == 0) { - memmove(&image_pointer[1], &image_pointer[_write_target_pointer], actual_length * _bytes_per_pixel); + memmove(&image_pointer[_bytes_per_pixel], &image_pointer[_write_target_pointer * _bytes_per_pixel], actual_length * _bytes_per_pixel); _write_target_pointer = 1; _last_allocation_amount = actual_length; _next_write_x_position = (uint16_t)(actual_length + 2);