OSDN Git Service

1.70では{!}という銘の場合にバグが残っていたので, get_item_allow()の最
authornothere <nothere@0568b783-4c39-0410-ac80-bf13821ea2a2>
Sat, 23 Aug 2003 14:29:01 +0000 (14:29 +0000)
committernothere <nothere@0568b783-4c39-0410-ac80-bf13821ea2a2>
Sat, 23 Aug 2003 14:29:01 +0000 (14:29 +0000)
初でcommand_cmd == 0ならばTRUEを返すように修正.

src/object1.c

index 396f898..f712b12 100644 (file)
@@ -5355,6 +5355,8 @@ static bool get_item_allow(int item)
 
        object_type *o_ptr;
 
+       if (!command_cmd) return TRUE; /* command_cmd is no longer effective */
+
        /* Inventory */
        if (item >= 0)
        {
@@ -5376,11 +5378,8 @@ static bool get_item_allow(int item)
        /* Process preventions */
        while (s)
        {
-               /* Ignore the "!!" inscription */
-               if (s[1] == '!') s++;
-
                /* Check the "restriction" */
-               else if ((s[1] == command_cmd) || (s[1] == '*'))
+               if ((s[1] == command_cmd) || (s[1] == '*'))
                {
                        /* Verify the choice */
 #ifdef JP