From: H.G. Muller Date: Mon, 29 Nov 2010 16:36:33 +0000 (+0100) Subject: Make WinBoard clocks translation-proof X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=8258dcc15ba1f18287e06a498a018410f70ed873;p=xboard.git Make WinBoard clocks translation-proof With logos on, the splitting of the clock over two lines assumed the lengths of the words "white" and "black" would always be 5. Used strlen. --- diff --git a/winboard/winboard.c b/winboard/winboard.c index ccebf78..1a90833 100644 --- a/winboard/winboard.c +++ b/winboard/winboard.c @@ -7447,7 +7447,7 @@ DisplayAClock(HDC hdc, int timeRemaining, int highlight, rect, str, strlen(str), NULL); if(logoHeight > 0 && appData.clockMode) { RECT r; - snprintf(buf, sizeof(buf)/sizeof(buf[0]), "%s %s", buf+7, flagFell); + snprintf(buf, sizeof(buf)/sizeof(buf[0]), "%s %s", buf+strlen(color)+2, flagFell); r.top = rect->top + logoHeight/2; r.left = rect->left; r.right = rect->right;