summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkdx <kikoodx@paranoici.org>2023-05-09 15:46:27 +0200
committerkdx <kikoodx@paranoici.org>2023-05-09 15:46:27 +0200
commit984c4f74d55cb1ce19916f22499055f0d577e6e6 (patch)
tree9a2b2021c3d4aff9a71931e785212873cc3be688
parent65d27473a29d29ebf7e05204f4d43805d490a317 (diff)
downloadpx-984c4f74d55cb1ce19916f22499055f0d577e6e6.tar.gz
palette was wrong by one
-rw-r--r--src/px.c2
1 files changed, 1 insertions, 1 deletions
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