CRUISE: Replace snprintf() usage with Common::String::format()

Safer and less portability issues.
This commit is contained in:
D G Turner 2011-06-02 03:03:21 +01:00
parent 889f5d119a
commit 37886ba7bb

View File

@ -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());
}
}