ACCESS: AMAZON: Fix crash due to Common::Language change

Thanks to eriktorbjorn for noticing a new addition to the
Common::Language enum was breaking the game
This commit is contained in:
Paul Gilbert 2019-03-03 21:52:57 -08:00
parent 0146ae2255
commit b35c5cba39

View File

@ -70,7 +70,20 @@ bool Resources::load(Common::String &errorMessage) {
_datIndex[idx]._gameId = f.readByte();
_datIndex[idx]._discType = f.readByte();
_datIndex[idx]._demoType = f.readByte();
_datIndex[idx]._language = (Common::Language)f.readByte();
byte language = f.readByte();
switch (language) {
case 0:
_datIndex[idx]._language = (Common::Language)0;
break;
case 5:
_datIndex[idx]._language = Common::EN_ANY;
break;
default:
error("Unknown language");
break;
}
_datIndex[idx]._fileOffset = f.readUint32LE();
}