movement: TOTP face, pad code with leading zeroes

This commit is contained in:
Joey Castillo 2021-11-24 12:20:32 -05:00
parent 169d4486f9
commit 1a1a862d79

View File

@ -52,7 +52,7 @@ bool totp_face_loop(movement_event_t event, movement_settings_t *settings, void
totp_state->steps = result.quot; totp_state->steps = result.quot;
} }
valid_for = TIMESTEP - result.rem; valid_for = TIMESTEP - result.rem;
sprintf(buf, "2f%2d%lu", valid_for, totp_state->current_code); sprintf(buf, "2f%2d%06lu", valid_for, totp_state->current_code);
watch_display_string(buf, 0); watch_display_string(buf, 0);
break; break;