Magic-number elimination.
authorEric S. Raymond <esr@thyrsus.com>
Wed, 5 Jul 2017 03:46:16 +0000 (23:46 -0400)
committerEric S. Raymond <esr@thyrsus.com>
Wed, 5 Jul 2017 03:46:16 +0000 (23:46 -0400)
actions.c

index abe9e5bb38ef2eac3a9b3e481bbbf1445c648874..48e987f8e67f86d84504b29a5f465085ff0afe03 100644 (file)
--- a/actions.c
+++ b/actions.c
@@ -477,7 +477,7 @@ static int discard(token_t verb, token_t obj, bool just_do_it)
                     /* FIXME: Arithmetic on state numbers */
                     int k = 2 - game.prop[RUG];
                     game.prop[RUG] = k;
                     /* FIXME: Arithmetic on state numbers */
                     int k = 2 - game.prop[RUG];
                     game.prop[RUG] = k;
-                    if (k == 2)
+                    if (k == RUG_HOVER)
                         k = objects[SAPPH].plac;
                     move(RUG + NOBJECTS, k);
                 }
                         k = objects[SAPPH].plac;
                     move(RUG + NOBJECTS, k);
                 }