aboutsummaryrefslogtreecommitdiff
path: root/engines/avalanche
diff options
context:
space:
mode:
authoruruk2013-07-25 16:28:52 +0200
committeruruk2013-07-25 16:28:52 +0200
commit63e7c5b3d110eb24563535a92b1804e4d2f4859b (patch)
treeb31298a67b1b8ff63e40c95f2be96003cb4c0949 /engines/avalanche
parent9b4c9e496fc81dc0f7a3194d0a65b82b111f7457 (diff)
downloadscummvm-rg350-63e7c5b3d110eb24563535a92b1804e4d2f4859b.tar.gz
scummvm-rg350-63e7c5b3d110eb24563535a92b1804e4d2f4859b.tar.bz2
scummvm-rg350-63e7c5b3d110eb24563535a92b1804e4d2f4859b.zip
AVALANCHE: Repair array indexes in Timeout and Trip.
Diffstat (limited to 'engines/avalanche')
-rw-r--r--engines/avalanche/timeout2.cpp8
-rw-r--r--engines/avalanche/trip6.cpp4
2 files changed, 6 insertions, 6 deletions
diff --git a/engines/avalanche/timeout2.cpp b/engines/avalanche/timeout2.cpp
index 7a10d670cc..b36f143eeb 100644
--- a/engines/avalanche/timeout2.cpp
+++ b/engines/avalanche/timeout2.cpp
@@ -57,11 +57,11 @@ Timeout::Timeout(AvalancheEngine *vm) {
}
void Timeout::set_up_timer(int32 howlong, byte whither, byte why) {
- fv = 1;
- while ((fv < 8) && (times[fv].time_left != 0))
- fv += 1;
+ fv = 0;
+ while ((fv < 7) && (times[fv].time_left != 0))
+ fv++;
- if (fv == 8)
+ if (fv == 7)
return; /* Oh dear... */
timetype &with = times[fv]; /* Everything's OK here! */
diff --git a/engines/avalanche/trip6.cpp b/engines/avalanche/trip6.cpp
index 0acad63c76..1a525d765e 100644
--- a/engines/avalanche/trip6.cpp
+++ b/engines/avalanche/trip6.cpp
@@ -1404,7 +1404,7 @@ void Trip::get_back_loretta() {
byte fv;
/* for fv:=1 to numtr do with tr[fv] do if quick then getback;*/
- for (fv = 1; fv <= numtr; fv++) {
+ for (fv = 0; fv < numtr; fv++) {
if (tr[fv].quick) {
getback();
return;
@@ -1627,7 +1627,7 @@ bool Trip::neardoor() { /* returns True if you're near a door! */
}
void Trip::new_game_for_trippancy() { /* Called by gyro.newgame */
- tr[1].visible = false;
+ tr[0].visible = false;
}