From 978d019d1fbc6789be06ecd8564ea5393aaed373 Mon Sep 17 00:00:00 2001 From: H.G.Muller Date: Mon, 3 Mar 2014 14:44:00 +0100 Subject: [PATCH] Allow passing command to InputCommand InputCommand was only called with argument command=NULL, but written such that it would execute the passed command rather than read one from stdin in other cases. (E.g. to execute a back-logged command.) But in such a case it should not ponder or analyze before processing the command, as these should only be done while waiting for true input. --- gnushogi/commondsp.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gnushogi/commondsp.c b/gnushogi/commondsp.c index 9556f63..ba56401 100644 --- a/gnushogi/commondsp.c +++ b/gnushogi/commondsp.c @@ -1511,7 +1511,7 @@ InputCommand(char *command) ZeroTTable(); #endif - if ((hint > 0) && !flag.easy && !flag.force) + if ((hint > 0) && !flag.easy && !flag.force && !command) { /* * A hint move for the player is available. Compute a move for the @@ -1575,7 +1575,7 @@ InputCommand(char *command) { player = opponent; - if (flag.analyze) { + if (flag.analyze && !command) { SelectMove(opponent, BACKGROUND_MODE); } -- 1.7.0.4