From: Joey Castillo Date: Tue, 1 Feb 2022 01:17:34 +0000 (-0800) Subject: sunrise/sunset: always set the sign bit X-Git-Url: https://git.earman.xyz/?a=commitdiff_plain;h=7085f89bfa32f650ce99b0dc6b00c1e89f76697f;p=sensor-watch.git sunrise/sunset: always set the sign bit --- diff --git a/movement/watch_faces/complication/sunrise_sunset_face.c b/movement/watch_faces/complication/sunrise_sunset_face.c index 5c47d5d..c8f33f2 100644 --- a/movement/watch_faces/complication/sunrise_sunset_face.c +++ b/movement/watch_faces/complication/sunrise_sunset_face.c @@ -115,7 +115,7 @@ static int16_t _sunrise_sunset_face_latlon_from_struct(sunrise_sunset_lat_lon_se static sunrise_sunset_lat_lon_settings_t _sunrise_sunset_face_struct_from_latlon(int16_t val) { sunrise_sunset_lat_lon_settings_t retval; - if (val < 0) retval.sign = 1; + retval.sign = val < 0; val = abs(val); retval.hundredths = val % 10; val /= 10;