From: H.G. Muller Date: Fri, 22 Oct 2010 18:25:06 +0000 (+0200) Subject: Fix merging bug X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=a9a9de13751f0b8a188d7d11957821e58c7aa03d;p=xboard.git 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. --- 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);