mirror of
https://github.com/libretro/scummvm.git
synced 2025-03-06 02:10:28 +00:00
DIRECTOR: Sanity check PACo palette was off by one
Palette has a length of 256.
This commit is contained in:
parent
94886c8f6b
commit
bee055140f
@ -2711,9 +2711,9 @@ void LB::b_xPlayAnim(int nargs){
|
||||
byte origPalette[256 * 3];
|
||||
uint16 origCount = g_director->getPaletteColorCount();
|
||||
|
||||
if (origCount > 255) {
|
||||
if (origCount > 256) {
|
||||
warning("b_xPlayAnim: too big palette, %d > 256", origCount);
|
||||
origCount = 255;
|
||||
origCount = 256;
|
||||
}
|
||||
|
||||
memcpy(origPalette, g_director->getPalette(), origCount * 3);
|
||||
|
Loading…
x
Reference in New Issue
Block a user