aboutsummaryrefslogtreecommitdiff
path: root/engines/access
diff options
context:
space:
mode:
authorPaul Gilbert2019-03-03 21:52:57 -0800
committerPaul Gilbert2019-03-03 21:52:57 -0800
commitb35c5cba3938e8aef21fb64c52a41654882d1398 (patch)
tree0110f3339669b4cff914c78bfb3d72a7d107e884 /engines/access
parent0146ae2255e880cac46f52d9fdd445634d691e75 (diff)
downloadscummvm-rg350-b35c5cba3938e8aef21fb64c52a41654882d1398.tar.gz
scummvm-rg350-b35c5cba3938e8aef21fb64c52a41654882d1398.tar.bz2
scummvm-rg350-b35c5cba3938e8aef21fb64c52a41654882d1398.zip
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
Diffstat (limited to 'engines/access')
-rw-r--r--engines/access/resources.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/engines/access/resources.cpp b/engines/access/resources.cpp
index a7b23eb56d..2b7f1aa8f3 100644
--- a/engines/access/resources.cpp
+++ b/engines/access/resources.cpp
@@ -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();
}