diff options
author | alberth <alberth@openttd.org> | 2016-09-04 12:58:04 +0000 |
---|---|---|
committer | alberth <alberth@openttd.org> | 2016-09-04 12:58:04 +0000 |
commit | 6f201ce4a8db0143ba0664aabdd04dc733adc243 (patch) | |
tree | a368495e00682bf58a0270ab1fe63d79e934a530 /src/console_cmds.cpp | |
parent | 597380e099688652e31fd1f406b53dee6b65da90 (diff) | |
download | openttd-6f201ce4a8db0143ba0664aabdd04dc733adc243.tar.xz |
(svn r27651) -Codechange: Introduce methods for setting the name and title of _file_to_saveload.
Diffstat (limited to 'src/console_cmds.cpp')
-rw-r--r-- | src/console_cmds.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/console_cmds.cpp b/src/console_cmds.cpp index c26f17f29..863929b94 100644 --- a/src/console_cmds.cpp +++ b/src/console_cmds.cpp @@ -363,9 +363,8 @@ DEF_CONSOLE_CMD(ConLoad) if (GetAbstractFileType(item->type) == FT_SAVEGAME) { _switch_mode = SM_LOAD_GAME; _file_to_saveload.SetMode(item->type); - - strecpy(_file_to_saveload.name, FiosBrowseTo(item), lastof(_file_to_saveload.name)); - strecpy(_file_to_saveload.title, item->title, lastof(_file_to_saveload.title)); + _file_to_saveload.SetName(FiosBrowseTo(item)); + _file_to_saveload.SetTitle(item->title); } else { IConsolePrintF(CC_ERROR, "%s: Not a savegame.", file); } |