test003: Fix off-by-one error in palette index
As the loop counter is 1-based, 1 must be subtracted when converting to
a palette index.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
diff --git a/tests/test003.c b/tests/test003.c
index 00b1062..13b874b 100644
--- a/tests/test003.c
+++ b/tests/test003.c
@@ -29,7 +29,7 @@
clut[i] = clut_console[i];
clut_update();
for (i = 1, x0 = 0; i <= 16; i++, x0 = x1) {
- pixel = idx_pixel[i];
+ pixel = idx_pixel[i-1];
x1 = i*fb_var.xres/16;
fill_rect(x0, 0, x1-x0, fb_var.yres, pixel);
}