autosel doesn't work since 1.0.77 (#1716)

This commit is contained in:
longpanda 2022-07-13 23:40:45 +08:00
parent 096cc99c3c
commit 5d6d6df39b

View file

@ -3642,7 +3642,7 @@ static grub_err_t ventoy_cmd_sel_auto_install(grub_extcmd_context_t ctxt, int ar
{ {
node->cursel = node->autosel - 1; node->cursel = node->autosel - 1;
debug("Auto install template auto select %d\n", node->autosel); debug("Auto install template auto select %d\n", node->autosel);
return 0; goto load;
} }
} }
@ -3682,6 +3682,7 @@ static grub_err_t ventoy_cmd_sel_auto_install(grub_extcmd_context_t ctxt, int ar
node->cursel = g_ventoy_last_entry - 1; node->cursel = g_ventoy_last_entry - 1;
load:
grub_check_free(node->filebuf); grub_check_free(node->filebuf);
node->filelen = 0; node->filelen = 0;