summaryrefslogtreecommitdiff
path: root/misc_gui.c
diff options
context:
space:
mode:
authorDarkvater <Darkvater@openttd.org>2006-03-21 22:08:15 +0000
committerDarkvater <Darkvater@openttd.org>2006-03-21 22:08:15 +0000
commit413dd85cd7da04afb486647d0f8f77ca8f5d0449 (patch)
treeb5b00ebf09959e957c1c291c92d531f5fbfcc8eb /misc_gui.c
parent1815383ba7ed31e43034f13134f5b6a7cf704145 (diff)
downloadopenttd-413dd85cd7da04afb486647d0f8f77ca8f5d0449.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.c4
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();