From a212539500a17f265815e77b9a6047279824315f Mon Sep 17 00:00:00 2001 From: Niclas Zeising Date: Wed, 27 Feb 2019 15:22:41 +0100 Subject: Fix logic sourrouning && and || Fix the logic sorrounding && and ||. && has higher precedence than ||, and as such, the if statement probably was incorrect. Fix this by adding parenthesises around the || statement. --- Clock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Clock.c b/Clock.c index e3f8f2b..bbfed20 100644 --- a/Clock.c +++ b/Clock.c @@ -1610,8 +1610,8 @@ clock_tic(XtPointer client_data, XtIntervalId *id) RenderHands (w, &tm, False); } if (w->clock.show_second_hand && - tm.tm_sec != w->clock.otm.tm_sec || - tv.tv_usec != w->clock.otv.tv_usec) + (tm.tm_sec != w->clock.otm.tm_sec || + tv.tv_usec != w->clock.otv.tv_usec)) { RenderSec (w, &w->clock.otm, &w->clock.otv, False); RenderSec (w, &tm, &tv, False); -- cgit v1.2.3