From 8e90f3d9990b7efa656900ddbc9ae748d306d010 Mon Sep 17 00:00:00 2001 From: Collin Smith Date: Sun, 6 Aug 2023 00:04:54 -0700 Subject: [PATCH] Fixed pixel buffer sign-extension for DccDecoder --- core/src/main/java/com/riiablo/file/DccDecoder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/java/com/riiablo/file/DccDecoder.java b/core/src/main/java/com/riiablo/file/DccDecoder.java index 3e10d1e6..930dde25 100644 --- a/core/src/main/java/com/riiablo/file/DccDecoder.java +++ b/core/src/main/java/com/riiablo/file/DccDecoder.java @@ -67,7 +67,7 @@ public final class DccDecoder { // )); // } for (int c = 0, s = pixelBuffer.size << 2; c < s; c++) { - pixels[c] = (byte) PALETTE[pixels[c]]; + pixels[c] = (byte) PALETTE[pixels[c] & 0xFF]; } // for (int c = 0, s = pixelBuffer.size; c < s; c++) { // final int c0 = (c << 2);