aboutsummaryrefslogtreecommitdiff
path: root/engines/hdb
diff options
context:
space:
mode:
Diffstat (limited to 'engines/hdb')
-rw-r--r--engines/hdb/hdb.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/engines/hdb/hdb.cpp b/engines/hdb/hdb.cpp
index 82e377df85..b7fdf304ba 100644
--- a/engines/hdb/hdb.cpp
+++ b/engines/hdb/hdb.cpp
@@ -849,7 +849,7 @@ void HDBGame::drawLoadingScreen() {
struct MapName {
const char *fName, *printName;
-} mapNames[] = {
+} static mapNames[] = {
{ "MAP00", "HDS Colby Jack" },
{ "MAP01", "Servandrones, Inc." },
{ "MAP02", "Pushbot Storage" },
@@ -884,15 +884,12 @@ struct MapName {
};
void HDBGame::setInMapName(const char *name) {
- int i = 0;
-
- while (mapNames[i].fName) {
+ for (uint i = 0; i < ARRAYSIZE(mapNames); i++) {
if (!scumm_stricmp(name, mapNames[i].fName)) {
memset(&_inMapName, 0, 32);
strcpy(_inMapName, mapNames[i].printName);
return;
}
- i++;
}
memset(&_inMapName, 0, 32);