summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy O'Brien <neutral@fastmail.com>2023-01-13 14:52:09 -0500
committerJeremy O'Brien <neutral@fastmail.com>2023-01-13 14:52:09 -0500
commite89ff78b10172f855cf5d72a58f7ad3ebff6131f (patch)
treea813480e4314a854d69c6ce9387eeee5f250fba4
parent4d987eb1f58dfe512f617b17772e89090cba6290 (diff)
downloadSensor-Watch-e89ff78b10172f855cf5d72a58f7ad3ebff6131f.tar.gz
Sensor-Watch-e89ff78b10172f855cf5d72a58f7ad3ebff6131f.tar.bz2
Sensor-Watch-e89ff78b10172f855cf5d72a58f7ad3ebff6131f.zip
alarm: fix accidental assignment vs conditional logic
-rw-r--r--movement/watch_faces/complication/alarm_face.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/movement/watch_faces/complication/alarm_face.c b/movement/watch_faces/complication/alarm_face.c
index a871452d..9acf5899 100644
--- a/movement/watch_faces/complication/alarm_face.c
+++ b/movement/watch_faces/complication/alarm_face.c
@@ -182,11 +182,11 @@ static void _alarm_update_alarm_enabled(movement_settings_t *settings, alarm_sta
if ((state->alarm[i].day == weekday_idx && alarm_minutes_of_day >= now_minutes_of_day)
|| ((weekday_idx + 1) % 7 == state->alarm[i].day && alarm_minutes_of_day <= now_minutes_of_day)
|| (state->alarm[i].day == ALARM_DAY_WORKDAY && (weekday_idx < 4
- || (weekday_idx = 5 && alarm_minutes_of_day >= now_minutes_of_day)
- || (weekday_idx = 6 && alarm_minutes_of_day <= now_minutes_of_day)))
- || (state->alarm[i].day == ALARM_DAY_WEEKEND && (weekday_idx == 5
- || (weekday_idx = 6 && alarm_minutes_of_day >= now_minutes_of_day)
- || (weekday_idx = 4 && alarm_minutes_of_day <= now_minutes_of_day)))) {
+ || (weekday_idx == 5 && alarm_minutes_of_day >= now_minutes_of_day)
+ || (weekday_idx == 6 && alarm_minutes_of_day <= now_minutes_of_day)))
+ || (state->alarm[i].day == ALARM_DAY_WEEKEND && (weekday_idx == 5
+ || (weekday_idx == 6 && alarm_minutes_of_day >= now_minutes_of_day)
+ || (weekday_idx == 4 && alarm_minutes_of_day <= now_minutes_of_day)))) {
active_alarms = true;
break;
}