aboutsummaryrefslogtreecommitdiff
path: root/engines/agi/preagi_mickey.cpp
diff options
context:
space:
mode:
authorEugene Sandulenko2010-10-15 08:49:20 +0000
committerEugene Sandulenko2010-10-15 08:49:20 +0000
commit764eaa554ce2633e9a927f7264ff3ca57ee5650d (patch)
tree322a3afc18b8eeef4f878a5a877615c7786ea791 /engines/agi/preagi_mickey.cpp
parent63cb05135142a55a542d1bc0d65093017c6d73d2 (diff)
downloadscummvm-rg350-764eaa554ce2633e9a927f7264ff3ca57ee5650d.tar.gz
scummvm-rg350-764eaa554ce2633e9a927f7264ff3ca57ee5650d.tar.bz2
scummvm-rg350-764eaa554ce2633e9a927f7264ff3ca57ee5650d.zip
AGI: Fix some code analysis warnings (bug #3087825)
svn-id: r53470
Diffstat (limited to 'engines/agi/preagi_mickey.cpp')
-rw-r--r--engines/agi/preagi_mickey.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/engines/agi/preagi_mickey.cpp b/engines/agi/preagi_mickey.cpp
index ec8a1f4878..ea041a93c7 100644
--- a/engines/agi/preagi_mickey.cpp
+++ b/engines/agi/preagi_mickey.cpp
@@ -302,6 +302,8 @@ void Mickey::getMouseMenuSelRow(MSA_MENU menu, int *sel0, int *sel1, int iRow, i
if (y != IDI_MSA_ROW_MENU_1) return;
sel = sel1;
break;
+ default:
+ return;
}
for (iWord = 0; iWord < menu.row[iRow].count; iWord++) {
@@ -1234,7 +1236,7 @@ int Mickey::getPlanet() {
if (!_game.nButtons)
return -1;
- for (int iPlanet = 0; iPlanet < IDI_MSA_MAX_DAT; iPlanet++) {
+ for (int iPlanet = 0; iPlanet < IDI_MSA_MAX_DAT - 1; iPlanet++) {
if (!strcmp(IDS_MSA_ADDR_PLANET[iPlanet], _game.szAddr)) {
return iPlanet;
}
@@ -1313,7 +1315,7 @@ void Mickey::flipSwitch() {
_game.iPlanetXtal[0] = IDI_MSA_PLANET_EARTH;
_game.iPlanetXtal[8] = IDI_MSA_PLANET_URANUS;
- for (int i = 1; i < 9; i++) {
+ for (int i = 1; i < IDI_MSA_MAX_PLANET; i++) {
if (i < 8) {
do {
// Earth (planet 0) and Uranus (planet 8) are excluded