VOYEUR: Fix memory overrun in fading code

This commit is contained in:
Paul Gilbert 2013-06-17 22:45:59 -04:00
parent ef902493c4
commit 1a2f6fe6f3

View File

@ -252,7 +252,7 @@ void EventsManager::startFade(CMapResource *cMap) {
int mapIndex = 0;
for (int idx = _fadeFirstCol; idx <= _fadeLastCol; ++idx, vgaP += 3) {
Common::copy(&cMap->_entries[mapIndex], &cMap->_entries[mapIndex + 3], vgaP);
Common::copy(&cMap->_entries[mapIndex], &cMap->_entries[mapIndex + 2], vgaP);
if (!(cMap->_fadeStatus & 1))
mapIndex += 3;