From 331461ae5abafe73955c162e46ee295ca27c831b Mon Sep 17 00:00:00 2001 From: Jean-loup Gailly Date: Thu, 11 Mar 2010 21:23:54 +0100 Subject: [PATCH] zzgo: always reset the default time for a new game. --- zzgo.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/zzgo.c b/zzgo.c index 3db6cb1..2a27bcb 100644 --- a/zzgo.c +++ b/zzgo.c @@ -172,12 +172,14 @@ int main(int argc, char *argv[]) fprintf(stderr, "IN: %s", buf); enum parse_code c = gtp_parse(b, e, ti, buf); - if (c == P_ENGINE_RESET && !e->keep_on_clear) { - b->es = NULL; - done_engine(e); - e = init_engine(engine, e_arg, b); + if (c == P_ENGINE_RESET) { ti[S_BLACK] = ti_default; ti[S_WHITE] = ti_default; + if (!e->keep_on_clear) { + b->es = NULL; + done_engine(e); + e = init_engine(engine, e_arg, b); + } } else if (c == P_UNKNOWN_COMMAND && gtp_port) { /* The gtp command is a weak identity check, * close the connection with a wrong peer. */ -- 2.11.4.GIT