diff options
author | D G Turner | 2019-08-17 22:29:15 +0100 |
---|---|---|
committer | D G Turner | 2019-08-17 22:29:15 +0100 |
commit | ef00f1d05366e1e7e18a339927081e333168879c (patch) | |
tree | a06d14add15a7ea4d4fd812761fc730da580e2b5 /engines/startrek | |
parent | 4d16d31d1d726fb37f0c96ebaf390546bfd6f470 (diff) | |
download | scummvm-rg350-ef00f1d05366e1e7e18a339927081e333168879c.tar.gz scummvm-rg350-ef00f1d05366e1e7e18a339927081e333168879c.tar.bz2 scummvm-rg350-ef00f1d05366e1e7e18a339927081e333168879c.zip |
STARTREK: Fix introduced bug in mission chain loading code
This needs to avoid loading when the mission is "VENG" i.e. the last
mission, since there is no next mission to load and this would have
loaded an invalid memory string.
Diffstat (limited to 'engines/startrek')
-rw-r--r-- | engines/startrek/room.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/startrek/room.cpp b/engines/startrek/room.cpp index 5cc913a6b3..c0ce89e2ba 100644 --- a/engines/startrek/room.cpp +++ b/engines/startrek/room.cpp @@ -557,7 +557,7 @@ void Room::endMission(int16 score, int16 arg1, int16 arg2) { "VENG" }; - for (int i = 0; i < ARRAYSIZE(missionNames); i++) { + for (int i = 0; i < ARRAYSIZE(missionNames)-1; i++) { if (_vm->_missionName == missionNames[i]) { _vm->_missionToLoad = missionNames[i + 1]; break; |