From 984c4f74d55cb1ce19916f22499055f0d577e6e6 Mon Sep 17 00:00:00 2001 From: kdx Date: Tue, 9 May 2023 15:46:27 +0200 Subject: palette was wrong by one --- src/px.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/px.c b/src/px.c index 7458bcd..e3f8da9 100644 --- a/src/px.c +++ b/src/px.c @@ -128,7 +128,7 @@ pxPset(int x, int y, PxCol c) return; pxzbuf[x + y * PX_WIDTH] = pxz; - pxbuf[x + y * PX_WIDTH] = pxpal[c].pal ? pxpal[c].pal : c; + pxbuf[x + y * PX_WIDTH] = pxpal[c].pal ? (pxpal[c].pal - 1) : c; } uint8_t -- cgit v1.2.3