VariableIndex += ((sizeof(UINT32) - ((UINTN) (VariableIndex))) & (sizeof(UINT32) - 1));\r
\r
//\r
- // Get all DriverDevicePath[]\r
+ // Get all DriverImageDevicePath[]\r
//\r
for (Index = 0; Index < DriverNumber; Index++) {\r
//\r
// NotEnd indicates whether current variable is the end variable.\r
//\r
if (NotEnd != 0) {\r
- UnicodeSPrint (OverrideVariableName, sizeof (OverrideVariableName), L"PlatDriOver%d", VariableNum);\r
+ UnicodeSPrint (OverrideVariableName, sizeof (OverrideVariableName), L"PlatDriOver%d", VariableNum++);\r
VariableBuffer = GetVariableAndSize (OverrideVariableName, &gEfiOverrideVariableGuid, &BufferSize);\r
ASSERT ((UINTN) VariableBuffer % sizeof(UINTN) == 0);\r
- VariableNum++;\r
if (VariableBuffer == NULL) {\r
FreeMappingDatabase (MappingDataBase);\r
return EFI_VOLUME_CORRUPTED;\r