Unspk'd inventory lookup
authorNHOrus <jy6x2b32pie9@yahoo.com>
Tue, 4 Jul 2017 08:37:30 +0000 (11:37 +0300)
committerNHOrus <jy6x2b32pie9@yahoo.com>
Tue, 4 Jul 2017 12:18:49 +0000 (15:18 +0300)
actions.c

index 4099b22aec39bb283da5d8c1fe7ce5f7bb5bcd14..f4633f58d617b9ab0fb4a3358a3daab618419005 100644 (file)
--- a/actions.c
+++ b/actions.c
@@ -778,19 +778,21 @@ static int fly(token_t verb, token_t obj)
 static int inven(void)
 /* Inventory. If object, treat same as find.  Else report on current burden. */
 {
-    int spk = NO_CARRY;
+    bool empty = true;
     for (int i = 1; i <= NOBJECTS; i++) {
         if (i == BEAR ||
             !TOTING(i))
             continue;
-        if (spk == NO_CARRY)
+        if (empty) {
             rspeak(NOW_HOLDING);
+            empty = false;
+        }
         pspeak(i, touch, -1, false);
-        spk = NO_MESSAGE;
     }
     if (TOTING(BEAR))
-        spk = TAME_BEAR;
-    rspeak(spk);
+        rspeak(TAME_BEAR);
+    if (empty)
+        rspeak(NO_CARRY);
     return GO_CLEAROBJ;
 }