From c56e99aef7659f2be087a929f0c20d168be7a549 Mon Sep 17 00:00:00 2001 From: Adrian Siekierka Date: Sat, 27 Apr 2024 10:16:57 +0200 Subject: [PATCH] fix regression in .PAL file loading --- src/zzt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/zzt.c b/src/zzt.c index 304ed61..e816322 100644 --- a/src/zzt.c +++ b/src/zzt.c @@ -1386,9 +1386,9 @@ int zzt_load_palette(u32 *colors) { for (int c = 0; c < PALETTE_COLOR_COUNT; c++) { int i = zzt.palette_lut[c]; - zzt.palette_dac[i * 3 + 0] = ((colors[i] >> 16) & 0xFF); - zzt.palette_dac[i * 3 + 1] = ((colors[i] >> 8) & 0xFF); - zzt.palette_dac[i * 3 + 2] = (colors[i] & 0xFF); + zzt.palette_dac[i * 3 + 0] = ((colors[c] >> 16) & 0xFF); + zzt.palette_dac[i * 3 + 1] = ((colors[c] >> 8) & 0xFF); + zzt.palette_dac[i * 3 + 2] = (colors[c] & 0xFF); } zzt_refresh_palette();