diff options
author | Darkvater <darkvater@openttd.org> | 2006-03-21 22:08:15 +0000 |
---|---|---|
committer | Darkvater <darkvater@openttd.org> | 2006-03-21 22:08:15 +0000 |
commit | 7656bf80759ea2af75e2694a9c070b75113d862d (patch) | |
tree | b5b00ebf09959e957c1c291c92d531f5fbfcc8eb /misc_gui.c | |
parent | 5701e1a23773c84ddb4492a07f43905c71594a4b (diff) | |
download | openttd-7656bf80759ea2af75e2694a9c070b75113d862d.tar.xz |
(svn r4001) - Add length parameter to FiosMakeSavegameName() and use this function for creating the full path instead of home-brewn snprintf.
Diffstat (limited to 'misc_gui.c')
-rw-r--r-- | misc_gui.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/misc_gui.c b/misc_gui.c index 492f34fcd..3301338ae 100644 --- a/misc_gui.c +++ b/misc_gui.c @@ -1325,7 +1325,7 @@ static void SaveLoadDlgWndProc(Window *w, WindowEvent *e) DeleteWindow(w); } else { // SLD_SAVE_GAME, SLD_SAVE_SCENARIO copy clicked name to editbox - ttd_strlcpy(WP(w, querystr_d).text.buf, file->name, WP(w, querystr_d).text.maxlength); + ttd_strlcpy(WP(w, querystr_d).text.buf, file->title, WP(w, querystr_d).text.maxlength); UpdateTextBufferSize(&WP(w, querystr_d).text); InvalidateWidget(w, 10); } @@ -1368,7 +1368,7 @@ static void SaveLoadDlgWndProc(Window *w, WindowEvent *e) } } else if (HASBIT(w->click_state, 12)) { /* Save button clicked */ _switch_mode = SM_SAVE; - FiosMakeSavegameName(_file_to_saveload.name, WP(w,querystr_d).text.buf); + FiosMakeSavegameName(_file_to_saveload.name, WP(w,querystr_d).text.buf, sizeof(_file_to_saveload.name)); /* In the editor set up the vehicle engines correctly (date might have changed) */ if (_game_mode == GM_EDITOR) StartupEngines(); |