Localize K.
[open-adventure.git] / main.c
diff --git a/main.c b/main.c
index 2b831f2fe3ecd7662e6ac4c5e0d074023cedb5cf..8e78500a698731e812db9f3971838dd10bf1118b 100644 (file)
--- a/main.c
+++ b/main.c
@@ -492,9 +492,9 @@ static void croak(FILE *cmdin)
  *  him, so we need game.oldlc2, which is the last place he was
  *  safe.) */
 
-static bool playermove(FILE *cmdin, token_t verb)
+static bool playermove(FILE *cmdin, token_t verb, int motion)
 {
-    int LL, K2, KK=KEY[game.loc], motion = K;
+    int LL, K2, KK=KEY[game.loc];
     game.newloc=game.loc;
     if (KK == 0)
        BUG(26);
@@ -1056,7 +1056,7 @@ Laction:
        BUG(99);
 
        /*  Figure out the new location */
-L8:    if (playermove(cmdin, VERB))
+L8:    if (playermove(cmdin, VERB, K))
            return true;
        else
            goto L2000;