Andrew Boyson / clock

Dependents:   oldheating gps motorhome heating

Revision:
50:b804e93ccc1e
Parent:
49:e4424cc18bcb
Child:
51:826c58fbfaed
diff -r e4424cc18bcb -r b804e93ccc1e clk/clkutc.c
--- a/clk/clkutc.c	Wed Jan 09 12:23:26 2019 +0000
+++ b/clk/clkutc.c	Wed Jan 09 18:22:00 2019 +0000
@@ -90,7 +90,7 @@
     if (!ClkUtcNextLeapEnable) return; //Do nothing if leaps are disabled
     
     int64_t utc = ClkUtcFromTai(tai);
-    int64_t leapStart = ClkUtcNextLeapSecond64 - ClkUtcNextLeapBackward ? 1 : 0;
+    int64_t leapStart = ClkUtcNextLeapSecond64 - (ClkUtcNextLeapBackward ? 1 : 0);
     
     if (utc < leapStart) return; //Do nothing until reached the leap start