mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2024-12-24 16:27:42 +01:00
Wrong cast in GetBootFromOption().
This commit is contained in:
parent
8b6f19f2c6
commit
2607bd4fbb
@ -327,12 +327,12 @@ GetBootFromOption(VOID)
|
||||
NameSize = *(UINT16*)Data;
|
||||
|
||||
Data += 2; // pointer to Volume name
|
||||
gSettings.DefaultVolume.strncpy((const char*)Data, NameSize);
|
||||
gSettings.DefaultVolume.strncpy((__typeof__(gSettings.DefaultVolume.wc_str()))Data, NameSize);
|
||||
|
||||
Data += NameSize;
|
||||
Name2Size = Len - NameSize;
|
||||
if (Name2Size != 0) {
|
||||
gSettings.DefaultLoader.strncpy((const char*)Data, NameSize);
|
||||
gSettings.DefaultLoader.strncpy((__typeof__(gSettings.DefaultVolume.wc_str()))Data, NameSize);
|
||||
}
|
||||
|
||||
DBG("Clover started with option to boot %ls from %ls\n",
|
||||
|
@ -1938,17 +1938,17 @@ RefitMain (IN EFI_HANDLE ImageHandle,
|
||||
GetBootFromOption();
|
||||
} else {
|
||||
ParseLoadOptions(&ConfName, &gConfigDict[1]);
|
||||
if (ConfName.isEmpty()) {
|
||||
if (ConfName.isEmpty()) {
|
||||
gConfigDict[1] = NULL;
|
||||
} else {
|
||||
SetOEMPath(ConfName);
|
||||
Status = LoadUserSettings(SelfRootDir, ConfName, &gConfigDict[1]);
|
||||
DBG("%ls\\%ls.plist%ls loaded with name from LoadOptions: %s\n",
|
||||
OEMPath.wc_str(), ConfName.wc_str(), EFI_ERROR(Status) ? L" not" : L"", strerror(Status));
|
||||
if (EFI_ERROR(Status)) {
|
||||
gConfigDict[1] = NULL;
|
||||
} else {
|
||||
SetOEMPath(ConfName);
|
||||
Status = LoadUserSettings(SelfRootDir, ConfName, &gConfigDict[1]);
|
||||
DBG("%ls\\%ls.plist%ls loaded with name from LoadOptions: %s\n",
|
||||
OEMPath.wc_str(), ConfName.wc_str(), EFI_ERROR(Status) ? L" not" : L"", strerror(Status));
|
||||
if (EFI_ERROR(Status)) {
|
||||
gConfigDict[1] = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (gConfigDict[1]) {
|
||||
|
Loading…
Reference in New Issue
Block a user