ref: bfc2d4e3269851e7d55fb9a58a03a94c64f163d9
parent: ff9c2dc4fc1a8e99c3cdd613462b4d5fe5185c2e
author: Clownacy <Clownacy@users.noreply.github.com>
date: Tue Apr 21 10:59:05 EDT 2020
...Maybe I should test my fixes before commit
--- a/src/Draw.cpp
+++ b/src/Draw.cpp
@@ -420,7 +420,7 @@
scaled_rect.bottom = rect->bottom * magnification;
// Do not draw invalid RECTs
- if (rcWork->right <= rcWork->left || rcWork->bottom <= rcWork->top)
+ if (scaled_rect.right <= scaled_rect.left || scaled_rect.bottom <= scaled_rect.top)
return;
RenderBackend_Blit(framebuffer, &scaled_rect, surf[surf_no], scaled_rect.left, scaled_rect.top, FALSE);
@@ -459,7 +459,7 @@
rcWork.bottom *= magnification;
// Do not draw invalid RECTs
- if (rcWork->right <= rcWork->left || rcWork->bottom <= rcWork->top)
+ if (rcWork.right <= rcWork.left || rcWork.bottom <= rcWork.top)
return;
RenderBackend_Blit(surf[surf_no], &rcWork, framebuffer, x * magnification, y * magnification, TRUE);
@@ -498,7 +498,7 @@
rcWork.bottom *= magnification;
// Do not draw invalid RECTs
- if (rcWork->right <= rcWork->left || rcWork->bottom <= rcWork->top)
+ if (rcWork.right <= rcWork.left || rcWork.bottom <= rcWork.top)
return;
RenderBackend_Blit(surf[surf_no], &rcWork, framebuffer, x * magnification, y * magnification, FALSE);
@@ -514,7 +514,7 @@
rcWork.bottom = rect->bottom * magnification;
// Do not draw invalid RECTs
- if (rcWork->right <= rcWork->left || rcWork->bottom <= rcWork->top)
+ if (rcWork.right <= rcWork.left || rcWork.bottom <= rcWork.top)
return;
RenderBackend_Blit(surf[from], &rcWork, surf[to], x * magnification, y * magnification, TRUE);
@@ -539,7 +539,7 @@
const unsigned char blue = (col >> 16) & 0xFF;
// Do not draw invalid RECTs
- if (dst_rect->right <= dst_rect->left || dst_rect->bottom <= dst_rect->top)
+ if (dst_rect.right <= dst_rect.left || dst_rect.bottom <= dst_rect.top)
return;
RenderBackend_ColourFill(framebuffer, &dst_rect, red, green, blue);
@@ -560,7 +560,7 @@
const unsigned char blue = (col >> 16) & 0xFF;
// Do not draw invalid RECTs
- if (dst_rect->right <= dst_rect->left || dst_rect->bottom <= dst_rect->top)
+ if (dst_rect.right <= dst_rect.left || dst_rect.bottom <= dst_rect.top)
return;
RenderBackend_ColourFill(surf[surf_no], &dst_rect, red, green, blue);