From a9a9de13751f0b8a188d7d11957821e58c7aa03d Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Fri, 22 Oct 2010 20:25:06 +0200 Subject: [PATCH] Fix merging bug A %g format was used to print an int in sending the level command, because decimal points were dropped when merging patches. Also an unused variable was removed to suppress a warning. --- backend.c | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/backend.c b/backend.c index 94f7bee..8a63a43 100644 --- a/backend.c +++ b/backend.c @@ -1083,7 +1083,6 @@ ParseTimeControl(tc, ti, mps) long tc2; char buf[MSG_SIZ], buf2[MSG_SIZ], *mytc = tc; int min, sec=0; - int len; if(ti >= 0 && !strchr(tc, '+') && !strchr(tc, '/') ) mps = 0; if(!strchr(tc, '+') && !strchr(tc, '/') && sscanf(tc, "%d:%d", &min, &sec) >= 1) @@ -13575,10 +13574,10 @@ SendTimeControl(cps, mps, tc, inc, sd, st) /* Note old gnuchess bug -- minutes:seconds used to not work. Fixed in later versions, but still avoid :seconds when seconds is 0. */ - snprintf(buf, MSG_SIZ, "level %d %ld %g\n", mps, tc/60000, inc/1000); + snprintf(buf, MSG_SIZ, "level %d %ld %g\n", mps, tc/60000, inc/1000.); } else { snprintf(buf, MSG_SIZ, "level %d %ld:%02d %g\n", mps, tc/60000, - seconds, inc/1000); + seconds, inc/1000.); } } SendToProgram(buf, cps); -- 1.7.0.4