Fix text buffer overflow in sunrise_sunset_face (#22)
This commit is contained in:
@@ -152,7 +152,7 @@ static void _sunrise_sunset_face_update(sunrise_sunset_state_t *state) {
|
||||
watch_display_text_with_fallback(WATCH_POSITION_TOP_LEFT, "RIS", "rI");
|
||||
sprintf(buf, "%2d", scratch_time.unit.day);
|
||||
watch_display_text(WATCH_POSITION_TOP_RIGHT, buf);
|
||||
sprintf(buf, "%2d%02d%s", scratch_time.unit.hour, scratch_time.unit.minute,longLatPresets[state->longLatToUse].name);
|
||||
sprintf(buf, "%2d%02d%2s", scratch_time.unit.hour, scratch_time.unit.minute,longLatPresets[state->longLatToUse].name);
|
||||
watch_display_text(WATCH_POSITION_BOTTOM, buf);
|
||||
return;
|
||||
} else {
|
||||
@@ -191,7 +191,7 @@ static void _sunrise_sunset_face_update(sunrise_sunset_state_t *state) {
|
||||
watch_display_text_with_fallback(WATCH_POSITION_TOP_LEFT, "SET", "SE");
|
||||
sprintf(buf, "%2d", scratch_time.unit.day);
|
||||
watch_display_text(WATCH_POSITION_TOP_RIGHT, buf);
|
||||
sprintf(buf, "%2d%02d%s", scratch_time.unit.hour, scratch_time.unit.minute,longLatPresets[state->longLatToUse].name);
|
||||
sprintf(buf, "%2d%02d%2s", scratch_time.unit.hour, scratch_time.unit.minute,longLatPresets[state->longLatToUse].name);
|
||||
watch_display_text(WATCH_POSITION_BOTTOM, buf);
|
||||
return;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user