Simplify overcomplicated code.
authorEric S. Raymond <esr@thyrsus.com>
Thu, 3 Aug 2017 18:22:38 +0000 (14:22 -0400)
committerEric S. Raymond <esr@thyrsus.com>
Thu, 3 Aug 2017 18:22:38 +0000 (14:22 -0400)
main.c

diff --git a/main.c b/main.c
index 7437c81d61ad6fa7b9056ddadf0ee9506fcc545b..a57694e3fb110e5e01a1ee73ae90d3cb85de9375 100644 (file)
--- a/main.c
+++ b/main.c
@@ -1121,17 +1121,16 @@ Lclearobj:
                     command.word[0].id = ENTRANCE;
                 }
             }
-            if (!((command.word[0].id != WATER && command.word[0].id != OIL) || (command.word[1].id != PLANT && command.word[1].id != DOOR))) {
+            if ((command.word[0].id == WATER || command.word[0].id == OIL) && (command.word[1].id == PLANT || command.word[1].id == DOOR)) {
                 if (AT(command.word[1].id)) {
                     command.word[1].id = POUR;
                     command.word[1].type = ACTION;
-                    strncpy(command.word[1].raw, "POUR", LINESIZE - 1);
+                    strncpy(command.word[1].raw, "pour", LINESIZE - 1);
                 }
             }
             if (command.word[0].id == CAGE && command.word[1].id == BIRD && HERE(CAGE) && HERE(BIRD)) {
                 command.word[0].id = CARRY;
                 command.word[0].type = ACTION;
-                strncpy(command.word[1].raw, "CATCH", LINESIZE - 1);
             }
         }