OSDN Git Service

生い立ち設定ファイル読み込みで, 読み込みに成功しても有効な"H:<str>"行
authornothere <nothere@0568b783-4c39-0410-ac80-bf13821ea2a2>
Wed, 11 Aug 2004 14:49:33 +0000 (14:49 +0000)
committernothere <nothere@0568b783-4c39-0410-ac80-bf13821ea2a2>
Wed, 11 Aug 2004 14:49:33 +0000 (14:49 +0000)
が1行もない場合は現在の生い立ちを消去しないように修正.

src/birth.c

index 0826da7..3f7b56f 100644 (file)
@@ -5291,6 +5291,20 @@ static bool do_cmd_histpref(void)
 
                return FALSE;
        }
+       else if (!histpref_buf[0])
+       {
+#ifdef JP
+               msg_print("Í­¸ú¤ÊÀ¸¤¤Î©¤ÁÀßÄê¤Ï¤³¤Î¥Õ¥¡¥¤¥ë¤Ë¤¢¤ê¤Þ¤»¤ó¡£");
+#else
+               msg_print("There does not exist valid background history preference.");
+#endif
+               msg_print(NULL);
+
+               /* Kill the buffer */
+               histpref_buf = NULL;
+
+               return FALSE;
+       }
 
        /* Clear the previous history strings */
        for (i = 0; i < 4; i++) p_ptr->history[i][0] = '\0';