From 5abf9481167a26721852ffd77d1adde4d38e23f2 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Thu, 8 Jul 2021 07:49:28 +0300 Subject: [PATCH] Fix movecmd always returning a direction My recent commit broke the 'm' (menu request) -prefix, because a thinko in movecmd made it always return a direction. --- src/cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cmd.c b/src/cmd.c index 998495179..bc0cdb89e 100644 --- a/src/cmd.c +++ b/src/cmd.c @@ -3707,7 +3707,7 @@ movecmd(char sym, int mode) char *mvkeys = (mode == MV_WALK) ? g.Cmd.move : ((mode == MV_RUN) ? g.Cmd.run : g.Cmd.rush); - for (d = 0; d < N_DIRS; d++) { + for (d = N_DIRS; d > DIR_ERR; d--) { if (mode == MV_ANY) { if (sym == g.Cmd.move[d] || sym == g.Cmd.rush[d]