summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--shmfd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/shmfd.c b/shmfd.c
index 2094efa..4d6d388 100644
--- a/shmfd.c
+++ b/shmfd.c
@@ -87,7 +87,7 @@ paint(uint32_t *base, int width, int height, int forward)
if (forward)
b = y * 256 / height;
else
- b = (255 - y) * 256 / height;
+ b = (height - y) * 256 / height;
base[y * width + x] = (r << 16) | (g << 8) | b;
}
}