Fix channel state corruption when typing an non-existent channel

This commit is contained in:
markmental 2026-03-28 17:42:07 -04:00
commit d501658b7e
2 changed files with 2 additions and 0 deletions

View file

@ -153,6 +153,7 @@ static void tune_relative(App *app, int delta) {
player_tune(&app->player, next_index);
fprintf(stderr, "[DEBUG tune_relative] after player_tune, current_index=%d\n", app->player.current_index);
app->channel_banner_until = SDL_GetTicks() + CHANNEL_BANNER_DURATION_MS;
app->numeric_input_invalid = 0;
}
static int find_channel_by_number(const ChannelList *channels, int number) {
@ -184,6 +185,7 @@ static void tune_to_channel(App *app, int channel_index) {
player_tune(&app->player, channel_index);
fprintf(stderr, "[DEBUG tune_to_channel] after player_tune, current_index=%d\n", app->player.current_index);
app->channel_banner_until = SDL_GetTicks() + CHANNEL_BANNER_DURATION_MS;
app->numeric_input_invalid = 0;
}
static void process_numeric_input(App *app) {

BIN
src/app.o

Binary file not shown.