summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormichi_cc <michi_cc@openttd.org>2011-12-26 14:53:19 +0000
committermichi_cc <michi_cc@openttd.org>2011-12-26 14:53:19 +0000
commit47171c7829312f032ad67a1fda5ce00360e9fcf4 (patch)
treeef3dd2619ce5c13ddc2063766fe0882c0922a532 /src
parentf7c7271ecf48131bfa23677c90d24f4e819a4d1f (diff)
downloadopenttd-47171c7829312f032ad67a1fda5ce00360e9fcf4.tar.xz
(svn r23674) -Fix (r23670): Don't read invalid memory in the 32bpp simple blitter.
Diffstat (limited to 'src')
-rw-r--r--src/blitter/32bpp_simple.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/blitter/32bpp_simple.cpp b/src/blitter/32bpp_simple.cpp
index fa6155d74..3a80fe991 100644
--- a/src/blitter/32bpp_simple.cpp
+++ b/src/blitter/32bpp_simple.cpp
@@ -122,7 +122,7 @@ Sprite *Blitter_32bppSimple::Encode(SpriteLoader::Sprite *sprite, AllocatorProc
dst[i].v = rgb_max;
/* Pre-convert the mapping channel to a RGB value */
- uint colour = this->AdjustBrightness(this->LookupColourInPalette(src[i].m), dst[i].v);
+ uint colour = this->AdjustBrightness(this->LookupColourInPalette(src->m), dst[i].v);
dst[i].r = GB(colour, 16, 8);
dst[i].g = GB(colour, 8, 8);
dst[i].b = GB(colour, 0, 8);