Skip to content

Commit

Permalink
SHERLOCK: RT: Fix array overrun when displaying journal
Browse files Browse the repository at this point in the history
  • Loading branch information
dreammaster committed Sep 12, 2015
1 parent 61bb7cc commit e9ae9ff
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions engines/sherlock/tattoo/tattoo_user_interface.cpp
Expand Up @@ -216,9 +216,9 @@ void TattooUserInterface::doJournal() {
TattooJournal &journal = *(TattooJournal *)_vm->_journal;
TattooScene &scene = *(TattooScene *)_vm->_scene;
Screen &screen = *_vm->_screen;
byte lookupTable[PALETTE_SIZE];
byte lookupTable[PALETTE_COUNT];

Common::copy(&_lookupTable[0], &_lookupTable[PALETTE_SIZE], &lookupTable[0]);
Common::copy(&_lookupTable[0], &_lookupTable[PALETTE_COUNT], &lookupTable[0]);
_menuMode = JOURNAL_MODE;
journal.show();

Expand All @@ -229,7 +229,7 @@ void TattooUserInterface::doJournal() {
// Restore the the old screen palette and greyscale lookup table
screen.clear();
screen.setPalette(screen._cMap);
Common::copy(&lookupTable[0], &lookupTable[PALETTE_SIZE], &_lookupTable[0]);
Common::copy(&lookupTable[0], &lookupTable[PALETTE_COUNT], &_lookupTable[0]);

// Restore the scene
screen._backBuffer1.blitFrom(screen._backBuffer2);
Expand Down

0 comments on commit e9ae9ff

Please sign in to comment.