Fix up copyright notices. SPDX wants only one per file.
[open-adventure.git] / actions.c
index cbc8d3ff59b1ee6d0f45066d75182f4286ef489c..9239b50aaf0149c3f86620dc5a6b7708a4bb7d4c 100644 (file)
--- a/actions.c
+++ b/actions.c
@@ -1,18 +1,17 @@
 /*
  * Actions for the dungeon-running code.
  *
- * SPDX-FileCopyrightText: 1977, 2005 by Will Crowther and Don Woods
- * SPDX-FileCopyrightText 2017 by Eric S. Raymond
+ * SPDX-FileCopyrightText: Copyright 1977, 2005 by Will Crowther and Don Woods, Copyright 2017 by Eric S. Raymond
  * SPDX-License-Identifier: BSD-2-Clause
  */
 
 #include <stdlib.h>
 #include <stdbool.h>
 #include <string.h>
-#include "advent.h"
-#include "dungeon.h"
 #include <inttypes.h>
 
+#include "advent.h"
+
 static phase_codes_t fill(verb_t, obj_t);
 
 static phase_codes_t attack(command_t command)
@@ -1099,7 +1098,7 @@ static phase_codes_t read(command_t command)
     if (command.obj == INTRANSITIVE) {
         command.obj = NO_OBJECT;
         for (int i = 1; i <= NOBJECTS; i++) {
-            if (HERE(i) && objects[i].texts[0] != NULL && game.objects[i].prop >= 0)
+            if (HERE(i) && objects[i].texts[0] != NULL && !PROP_IS_STASHED(i))
                 command.obj = command.obj * NOBJECTS + i;
         }
         if (command.obj > NOBJECTS || command.obj == NO_OBJECT || DARK(game.loc))