Fix the frame size check when copying images to FB.

* The size of the image to be copied was compared to the size
of the current frame instead of the size of the whole buffer.
This commit is contained in:
iabdalkader 2020-07-20 21:41:51 +02:00
parent 1d93c54983
commit b1b7c74b15

View File

@ -383,7 +383,7 @@ void py_helper_update_framebuffer(image_t *img)
void py_helper_set_to_framebuffer(image_t *img)
{
PY_ASSERT_TRUE_MSG((image_size(img) <= framebuffer_get_frame_size()),
PY_ASSERT_TRUE_MSG((image_size(img) <= framebuffer_get_buffer_size()),
"The image doesn't fit in the frame buffer!");
framebuffer_set(img->w, img->h, img->bpp);
img->data = framebuffer_get_buffer();