Skip to content
This repository was archived by the owner on Feb 25, 2024. It is now read-only.

Commit a9a735e

Browse files
author
Rene Ladan
committed
Fix a bug where a bogus month value (15) with a correct parity would not turn the date parity bit blue.
1 parent 154b2fd commit a9a735e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

dcf77pi.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,9 @@ display_time(struct DT_result dt, struct tm time)
172172
mvwchgat(decode_win, 0, 48, 1, A_NORMAL, dt.hour_status ==
173173
eval_parity ? 1 : dt.hour_status == eval_bcd ? 4 : 2, NULL);
174174
mvwchgat(decode_win, 0, 76, 1, A_NORMAL, dt.mday_status ==
175-
eval_parity ? 1 : dt.mday_status == eval_bcd ? 4 : 2, NULL);
175+
eval_parity ? 1 : (dt.mday_status == eval_bcd ||
176+
dt.wday_status == eval_bcd || dt.month_status == eval_bcd ||
177+
dt.year_status == eval_bcd) ? 4 : 2, NULL);
176178
if (dt.leapsecond_status == els_one)
177179
mvwchgat(decode_win, 0, 78, 1, A_NORMAL, 3, NULL);
178180

0 commit comments

Comments
 (0)