Skip to content

Commit

Permalink
CRUISE: Replace snprintf() usage with Common::String::format()
Browse files Browse the repository at this point in the history
Safer and less portability issues.
  • Loading branch information
digitall committed Jun 2, 2011
1 parent 889f5d1 commit 37886ba
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions engines/cruise/menu.cpp
Expand Up @@ -225,13 +225,10 @@ static void handleSaveLoad(bool saveFlag) {
Common::String result(dialog->getResultString());
if (result.empty()) {
// If the user was lazy and entered no save name, come up with a default name.
char buf[20];
snprintf(buf, 20, "Save %d", slot + 1);

_vm->saveGameState(slot, buf);
} else {
_vm->saveGameState(slot, result.c_str());
result = Common::String::format("Save %d", slot + 1);
}

_vm->saveGameState(slot, result.c_str());
}
}

Expand Down

0 comments on commit 37886ba

Please sign in to comment.