]> git.earman.xyz Git - sensor-watch.git/commitdiff
sunrise/sunset: always set the sign bit
authorJoey Castillo <joeycastillo@utexas.edu>
Tue, 1 Feb 2022 01:17:34 +0000 (17:17 -0800)
committerJoey Castillo <joeycastillo@utexas.edu>
Tue, 1 Feb 2022 01:17:34 +0000 (17:17 -0800)
movement/watch_faces/complication/sunrise_sunset_face.c

index 5c47d5d0c53fc438225f3922467dd2f90268d6c8..c8f33f29a2c8064bed116322f1d5f54475155f5b 100644 (file)
@@ -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;