From 8258dcc15ba1f18287e06a498a018410f70ed873 Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Mon, 29 Nov 2010 17:36:33 +0100 Subject: [PATCH] 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. --- winboard/winboard.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) 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; -- 1.7.0.4