From 88ae3317e3d6fda03a8b88737e0342e5576689bd Mon Sep 17 00:00:00 2001 From: dis- Date: Sat, 13 Feb 2021 11:02:01 +0900 Subject: [PATCH] =?utf8?q?[Fix]=20=E3=82=BB=E3=83=BC=E3=83=96=E3=83=95?= =?utf8?q?=E3=82=A1=E3=82=A4=E3=83=AB=E3=82=92=E6=8C=87=E5=AE=9A=E3=81=97?= =?utf8?q?=E3=81=A6=E8=B5=B7=E5=8B=95=E3=81=97=E3=81=9F=E6=99=82=E3=81=ABp?= =?utf8?q?ath=E6=8C=87=E5=AE=9A=E3=81=8C=E3=81=8A=E3=81=8B=E3=81=97?= =?utf8?q?=E3=81=8F=E3=81=A6=E8=B5=B7=E5=8B=95=E3=81=97=E3=81=AA=E3=81=84?= =?utf8?q?=20#101?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit コマンドライン等からセーブファイルを起動するときcheck_for_save_file()にて引数を判断している。 ここでグローバル変数savefileが空であることを前提にしてstrcatしていたためパスを正常に指定できなくなっていた。 コマンドライン等からの起動であるとき、INIファイルを無視して指定セーブを開く挙動が正しい。 よってsavefileを上書きするstrcpyを使用するよう変更した。 ついでに、初期化中ダイアログを初期化処理未完了の場合のみ表示するよう変更。 --- src/main-win.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main-win.c b/src/main-win.c index 8420928d6..6624ecbb7 100644 --- a/src/main-win.c +++ b/src/main-win.c @@ -2275,7 +2275,7 @@ static void check_for_save_file(player_type *player_ptr, LPSTR cmd_line) if (!*s) return; - strcat(savefile, s); + strcpy(savefile, s); validate_file(savefile); game_in_progress = TRUE; play_game(player_ptr, FALSE, FALSE); -- 2.11.0