fix crash at position 0

This commit is contained in:
Virt 2025-04-15 11:10:11 +02:00
commit 9e98ab5384

View file

@ -1131,7 +1131,7 @@ static void surface_next_frame (void)
pixman_image_fill_rectangles( pixman_image_fill_rectangles(
PIXMAN_OP_CLEAR, buffer->pixman_image, &bg_colour, PIXMAN_OP_CLEAR, buffer->pixman_image, &bg_colour,
1, &(pixman_rectangle16_t){ 1, &(pixman_rectangle16_t){
(int16_t)surface.prev_neko_x - neko_size, (int16_t)0, surface.prev_neko_x >= neko_size ? (int16_t) surface.prev_neko_x - neko_size : (int16_t) 0, (int16_t)0,
(uint16_t)neko_size * 3, (uint16_t)neko_size, (uint16_t)neko_size * 3, (uint16_t)neko_size,
} }
); );