mirror of
https://github.com/TomHarte/CLK.git
synced 2024-12-23 20:29:42 +00:00
Made some minor corrections on the copyback of misplaced write data.
This commit is contained in:
parent
45af963b9a
commit
e6a7161e87
@ -53,9 +53,9 @@ void CRTInputBufferBuilder::reduce_previous_allocation_to(size_t actual_length)
|
||||
uint8_t *const image_pointer = _image.get();
|
||||
|
||||
// correct if the writing cursor was reset while a client was writing
|
||||
if(_next_write_x_position == 0 && _next_write_y_position == 0 && _write_target_pointer != 1)
|
||||
if(_next_write_x_position == 0 && _next_write_y_position == 0)
|
||||
{
|
||||
memmove(&image_pointer[1], &image_pointer[_write_target_pointer], actual_length);
|
||||
memmove(&image_pointer[1], &image_pointer[_write_target_pointer], actual_length * _bytes_per_pixel);
|
||||
_write_target_pointer = 1;
|
||||
_last_allocation_amount = actual_length;
|
||||
_next_write_x_position = (uint16_t)(actual_length + 2);
|
||||
|
Loading…
Reference in New Issue
Block a user