Skip to content

Commit

Permalink
SUPERNOVA: Fix reading of .dat file
Browse files Browse the repository at this point in the history
When searching for the right block in supernova.dat, the engine
didn't take into account the full size of each block (it thought,
it read 12 bytes less in each block) and thanks to that it
tryed to read one additional block at the end.
  • Loading branch information
vyzigold committed Sep 18, 2019
1 parent 00728b9 commit 4c3f2c3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion engines/supernova/supernova.cpp
Expand Up @@ -501,7 +501,8 @@ Common::SeekableReadStream *SupernovaEngine::getBlockFromDatFile(Common::String
return f.readStream(size);
} else {
f.skip(size);
readSize += size;
// size + 4 bytes for id + 4 bytes for lang + 4 bytes for size
readSize += size + 12;
}
}

Expand Down

0 comments on commit 4c3f2c3

Please sign in to comment.