Remove "ZeroMem(&gSettings.BootArgs, 256);" because BootArgs is now an

XString.
This commit is contained in:
jief666 2020-08-31 15:24:00 +03:00
parent 1963d37ef1
commit 8449a39e4f
3 changed files with 14 additions and 23 deletions

View File

@ -2654,7 +2654,7 @@ UINTN REFIT_MENU_SCREEN::RunMainMenu(IN INTN DefaultSelection, OUT REFIT_ABSTRAC
if (TempChosenEntry->getLOADER_ENTRY()->LoadOptions.notEmpty()) {
gSettings.BootArgs = TempChosenEntry->getLOADER_ENTRY()->LoadOptions.ConcatAll(" "_XS8);
} else {
ZeroMem(&gSettings.BootArgs, 255);
gSettings.BootArgs.setEmpty();
}
DBG(" boot with args: %s\n", gSettings.BootArgs.c_str());
}

View File

@ -471,22 +471,13 @@ VOID ApplyInputs(VOID)
BOOLEAN NeedSave = TRUE;
INTN i = 0;
UINTN j;
// UINT32 k;
CHAR16 *ch;
CHAR8 AString[256];
// DBG("ApplyInputs\n");
if (InputItems[i].Valid) {
ZeroMem(&gSettings.BootArgs, 256);
gBootChanged = TRUE;
ch = InputItems[i].SValue.data(0);
do {
if (*ch == L'\\') {
*ch = L'_';
}
} while (*(++ch));
gSettings.BootArgs = InputItems[i].SValue;
gSettings.BootArgs.replaceAll('\\', '_');
gBootChanged = TRUE;
}
i++; //1
if (InputItems[i].Valid) {