OSDN Git Service

{%!!}という銘が刻まれた場合に最後の'!'の右側が文字列終端の'\0'であり,
authornothere <nothere@0568b783-4c39-0410-ac80-bf13821ea2a2>
Sat, 23 Aug 2003 14:14:50 +0000 (14:14 +0000)
committernothere <nothere@0568b783-4c39-0410-ac80-bf13821ea2a2>
Sat, 23 Aug 2003 14:14:50 +0000 (14:14 +0000)
command_cmd == 0にヒットした結果, 確認が出てしまうバグを修正. {!!}の
銘はget_item_allow()内では無視することとした. 1.68でのcommand_cmd = 0
とする変更によるエンバグであった.

src/object1.c

index 2ab40a4..396f898 100644 (file)
@@ -5376,8 +5376,11 @@ static bool get_item_allow(int item)
        /* Process preventions */
        while (s)
        {
+               /* Ignore the "!!" inscription */
+               if (s[1] == '!') s++;
+
                /* Check the "restriction" */
-               if ((s[1] == command_cmd) || (s[1] == '*'))
+               else if ((s[1] == command_cmd) || (s[1] == '*'))
                {
                        /* Verify the choice */
 #ifdef JP