From 968e52ee98cb6307d7dbc6b7de2568d98073f034 Mon Sep 17 00:00:00 2001 From: Orgad Shaneh Date: Sun, 20 Jun 2021 11:47:36 +0300 Subject: [PATCH] GRAPHICS: Fix crash when resizing the window to low width --- graphics/VectorRendererSpec.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/graphics/VectorRendererSpec.h b/graphics/VectorRendererSpec.h index 4e934030faa..4d29f467c82 100644 --- a/graphics/VectorRendererSpec.h +++ b/graphics/VectorRendererSpec.h @@ -279,13 +279,13 @@ protected: * @param alpha Alpha intensity of the pixel (0-255) */ inline void blendFill(PixelType *first, PixelType *last, PixelType color, uint8 alpha) { - while (first != last) + while (first < last) blendPixelPtr(first++, color, alpha); } inline void blendFillClip(PixelType *first, PixelType *last, PixelType color, uint8 alpha, int realX, int realY) { if (_clippingArea.top <= realY && realY < _clippingArea.bottom) { - while (first != last) { + while (first < last) { if (_clippingArea.left <= realX && realX < _clippingArea.right) blendPixelPtr(first++, color, alpha); else