Skip to content

Commit

Permalink
Merge 'fix-sunrise-sunset-uninitialized'
Browse files Browse the repository at this point in the history
Fixes a crash due to use of uninitialized buffer when setting location.

Reported-by: eshrh <[email protected]>
Fixed-by: Wesley Aptekar-Cassels <[email protected]>
Reviewed-by: Matheus Afonso Martins Moreira <[email protected]>
Signed-off-by: Matheus Afonso Martins Moreira <[email protected]>
GitHub-Pull-Request: joeycastillo#329
GitHub-Issue: joeycastillo#198
Fixes: joeycastillo#198
  • Loading branch information
matheusmoreira committed Mar 5, 2024
2 parents 4ee3e7f + 1f6409a commit efff14b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions movement/watch_faces/complication/sunrise_sunset_face.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit efff14b

Please sign in to comment.