diff options
Diffstat (limited to 'engines/sci/graphics/picture.cpp')
-rw-r--r-- | engines/sci/graphics/picture.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/engines/sci/graphics/picture.cpp b/engines/sci/graphics/picture.cpp index 3ae1fd06fb..96c6e98595 100644 --- a/engines/sci/graphics/picture.cpp +++ b/engines/sci/graphics/picture.cpp @@ -424,7 +424,6 @@ void GfxPicture::drawVectorData(const SciSpan<const byte> &data) { byte pic_priority = 255, pic_control = 255; int16 x = 0, y = 0, oldx, oldy; byte EGApalettes[PIC_EGAPALETTE_TOTALSIZE] = {0}; - byte *EGApalette = &EGApalettes[_EGApaletteNo * PIC_EGAPALETTE_SIZE]; byte EGApriority[PIC_EGAPRIORITY_SIZE] = {0}; bool isEGA = false; uint curPos = 0; @@ -438,8 +437,10 @@ void GfxPicture::drawVectorData(const SciSpan<const byte> &data) { memset(&palette, 0, sizeof(palette)); - if (_EGApaletteNo >= PIC_EGAPALETTE_COUNT) + if (_EGApaletteNo >= PIC_EGAPALETTE_COUNT) { _EGApaletteNo = 0; + } + byte *EGApalette = &EGApalettes[_EGApaletteNo * PIC_EGAPALETTE_SIZE]; if (_resMan->getViewType() == kViewEga) { isEGA = true; |