summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-06-30 19:28:00 +0000
committertron <tron@openttd.org>2005-06-30 19:28:00 +0000
commit75bb548da44b5c757cc356fbaa7e7d264bad76f5 (patch)
tree40061d33da95744aac2185b2d01d2bc1456a0e63
parent46074e0dd834f1c7db4ddab8863a2f4365caf03a (diff)
downloadopenttd-75bb548da44b5c757cc356fbaa7e7d264bad76f5.tar.xz
(svn r2501) Forgot to change part of the win32 code in r2497
-rw-r--r--win32.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/win32.c b/win32.c
index 498144c7e..640242a3c 100644
--- a/win32.c
+++ b/win32.c
@@ -72,12 +72,11 @@ static void UpdatePalette(HDC dc, uint start, uint count)
{
RGBQUAD rgb[256];
uint i;
- byte *b;
- for (i = 0, b = _cur_palette + start * 3; i != count; i++, b += 3) {
- rgb[i].rgbRed = b[0];
- rgb[i].rgbGreen = b[1];
- rgb[i].rgbBlue = b[2];
+ for (i = 0; i != count; i++) {
+ rgb[i].rgbRed = _cur_palette[start + i].r;
+ rgb[i].rgbGreen = _cur_palette[start + i].g;
+ rgb[i].rgbBlue = _cur_palette[start + i].b;
rgb[i].rgbReserved = 0;
}