From 71fcf42b84fb7f7319390bd742c488c1cda7aab5 Mon Sep 17 00:00:00 2001 From: Anuken Date: Thu, 30 May 2024 10:46:18 -0400 Subject: [PATCH] Pixmap optimizations (potential crash fix) (cherry picked from commit 480129c79d78132aed6d06ef83f30cd6639ae2ea) --- arc-core/src/arc/graphics/Pixmap.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arc-core/src/arc/graphics/Pixmap.java b/arc-core/src/arc/graphics/Pixmap.java index aae71eb5..2148b3a9 100644 --- a/arc-core/src/arc/graphics/Pixmap.java +++ b/arc-core/src/arc/graphics/Pixmap.java @@ -437,7 +437,7 @@ public void draw(Pixmap pixmap, int srcx, int srcy, int srcWidth, int srcHeight, startX = Math.max(dstx, 0), endX = Math.min(dstx + Math.min(dstWidth, owidth), width), offsetY = dsty - srcy, - scanX = Math.max(srcx, -dstx), + scanX = Math.max(Math.max(srcx, -dstx), 0), scanWidth = (endX - startX) * 4; while(startY < endY){