[FREELDR] Reset BootType before reading its value in the freeldr.ini OS section, if it exists

Because if the value doesn't exist in the OS section, the value isn't
reset and the code would reuse a stray one that was for the previous entry.
This commit is contained in:
Hermès Bélusca-Maïto
2026-05-06 22:21:59 +02:00
parent 45aa3c2a17
commit 81752ca211

View File

@@ -161,6 +161,7 @@ InitOperatingSystemList(
if (HadSection)
{
/* This is a new OS entry: try to read the boot type */
*BootType = ANSI_NULL;
IniReadSettingByName(SectionId, "BootType", BootType, sizeof(BootType));
}
else