diff options
author | Matheus Afonso Martins Moreira <matheus.a.m.moreira@gmail.com> | 2024-03-05 01:40:15 -0300 |
---|---|---|
committer | Matheus Afonso Martins Moreira <matheus.a.m.moreira@gmail.com> | 2024-03-08 06:49:18 -0300 |
commit | a4ee7dd7fc1bce954b0afc9a2a56fdda2b86b501 (patch) | |
tree | 15e4dd0ecbd7dc76998873772b27c990bd2233bf | |
parent | af18673e1aa53091880d829a6fa4d7e23a6b4381 (diff) | |
parent | 1f6409a71c1309a6d47cf4845d8b39d519bd8ebc (diff) | |
download | Sensor-Watch-a4ee7dd7fc1bce954b0afc9a2a56fdda2b86b501.tar.gz Sensor-Watch-a4ee7dd7fc1bce954b0afc9a2a56fdda2b86b501.tar.bz2 Sensor-Watch-a4ee7dd7fc1bce954b0afc9a2a56fdda2b86b501.zip |
Merge 'fix-sunrise-sunset-uninitialized'
Fixes a crash due to use of uninitialized buffer when setting location.
Reported-by: eshrh <esrh@gatech.edu>
Fixed-by: Wesley Aptekar-Cassels <me@wesleyac.com>
Reviewed-by: Matheus Afonso Martins Moreira <matheus.a.m.moreira@gmail.com>
Tested-by: Matheus Afonso Martins Moreira <matheus.a.m.moreira@gmail.com>
Tested-on-hardware-by: Matheus Afonso Martins Moreira <matheus.a.m.moreira@gmail.com>
Signed-off-by: Matheus Afonso Martins Moreira <matheus.a.m.moreira@gmail.com>
GitHub-Pull-Request: https://github.com/joeycastillo/Sensor-Watch/pull/329
GitHub-Issue: https://github.com/joeycastillo/Sensor-Watch/issues/198
Fixes: https://github.com/joeycastillo/Sensor-Watch/issues/198
-rw-r--r-- | movement/watch_faces/complication/sunrise_sunset_face.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/movement/watch_faces/complication/sunrise_sunset_face.c b/movement/watch_faces/complication/sunrise_sunset_face.c index 82de9c6e..7330c42c 100644 --- a/movement/watch_faces/complication/sunrise_sunset_face.c +++ b/movement/watch_faces/complication/sunrise_sunset_face.c @@ -197,6 +197,8 @@ static void _sunrise_sunset_face_update_settings_display(movement_event_t event, char buf[12]; switch (state->page) { + case 0: + return; case 1: sprintf(buf, "LA %c %04d", state->working_latitude.sign ? '-' : '+', abs(_sunrise_sunset_face_latlon_from_struct(state->working_latitude))); break; |