summaryrefslogtreecommitdiff
path: root/src/px.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/px.c')
-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