mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-15 22:28:10 +00:00
AGI: Don't use unsafe strcat and strcpy
This commit is contained in:
parent
d8a4c106dd
commit
c89f760066
@ -205,10 +205,10 @@ SaveStateList AgiMetaEngine::listSaves(const char *target) const {
|
||||
break;
|
||||
}
|
||||
if (descriptionPos >= sizeof(description)) {
|
||||
strcpy(description, "[broken saved game]");
|
||||
Common::strcpy_s(description, "[broken saved game]");
|
||||
}
|
||||
} else {
|
||||
strcpy(description, "[not an AGI saved game]");
|
||||
Common::strcpy_s(description, "[not an AGI saved game]");
|
||||
}
|
||||
|
||||
delete in;
|
||||
|
@ -614,7 +614,7 @@ void MickeyEngine::patchMenu(MSA_MENU *menu) {
|
||||
|
||||
// change planet name in ship airlock menu
|
||||
if (_gameStateMickey.iRoom == IDI_MSA_PIC_SHIP_AIRLOCK) {
|
||||
strcpy((char *)menu->row[1].entry[2].szText, IDS_MSA_NAME_PLANET[_gameStateMickey.iPlanet]);
|
||||
Common::strcpy_s(menu->row[1].entry[2].szText, IDS_MSA_NAME_PLANET[_gameStateMickey.iPlanet]);
|
||||
}
|
||||
|
||||
// exit if fix unnecessary
|
||||
|
@ -436,7 +436,7 @@ int AgiEngine::loadGame(const Common::String &fileName, bool checkId) {
|
||||
// this fact in the debug output. The string saved in "md5" will never match
|
||||
// any valid MD5 sum, thus it is safe to do that here.
|
||||
if (md5[0] == 0)
|
||||
strcpy(md5, "fallback matched");
|
||||
Common::strcpy_s(md5, "fallback matched");
|
||||
|
||||
debug(0, "Saved game MD5: \"%s\"", md5);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user