Fix clearing the default environment

This commit is contained in:
Maschell 2022-01-03 19:00:35 +01:00
parent 9b86283cfd
commit fb5f06064e

View File

@ -359,6 +359,9 @@ std::string EnvironmentSelectionScreen(const std::map<std::string, std::string>
free(screenBuffer); free(screenBuffer);
if (autoBoot != autobootIndex) { if (autoBoot != autobootIndex) {
if (autoBoot == -1) {
writeFileContent(AUTOBOOT_CONFIG_PATH, "-1");
} else {
int i = 0; int i = 0;
for (auto const&[key, val]: payloads) { for (auto const&[key, val]: payloads) {
if (i == autoBoot) { if (i == autoBoot) {
@ -369,6 +372,7 @@ std::string EnvironmentSelectionScreen(const std::map<std::string, std::string>
i++; i++;
} }
} }
}
int i = 0; int i = 0;
for (auto const&[key, val]: payloads) { for (auto const&[key, val]: payloads) {