mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-23 20:51:14 +00:00
CRUISE: Replace snprintf() usage with Common::String::format()
Safer and less portability issues.
This commit is contained in:
parent
889f5d119a
commit
37886ba7bb
@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user