From 413dd85cd7da04afb486647d0f8f77ca8f5d0449 Mon Sep 17 00:00:00 2001 From: Darkvater Date: Tue, 21 Mar 2006 22:08:15 +0000 Subject: (svn r4001) - Add length parameter to FiosMakeSavegameName() and use this function for creating the full path instead of home-brewn snprintf. --- misc_gui.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'misc_gui.c') 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(); -- cgit v1.2.3-54-g00ecf