mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-04 06:00:15 +00:00
(svn r23674) -Fix (r23670): Don't read invalid memory in the 32bpp simple blitter.
This commit is contained in:
parent
6744a61442
commit
c54c4398b1
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user