Lower = TRUE;\r
} else if (*String == L'&') {\r
Lower = FALSE;\r
- } else if (Lower && *String > L'A' && *String <= L'F') {\r
+ } else if (Lower && *String >= L'A' && *String <= L'F') {\r
*String = (CHAR16) (*String - L'A' + L'a');\r
}\r
}\r
the Device Path associated with DriverHandle is converted\r
to a 2 Unicode character hexidecimal string.\r
\r
- @retval NULL DriverHandle does not support the Device Path Protocol.\r
@retval NULL DriverHandle does not support the Device Path Protocol.\r
@retval Other A pointer to the Null-terminate Unicode <ConfigHdr> string\r
\r
NameLength = StrLen (Name);\r
}\r
\r
+ DevicePath = NULL;\r
+ DevicePathSize = 0;\r
//\r
// Retrieve DevicePath Protocol associated with DriverHandle\r
//\r
- DevicePath = DevicePathFromHandle (DriverHandle);\r
- if (DevicePath == NULL) {\r
- return NULL;\r
+ if (DriverHandle != NULL) {\r
+ DevicePath = DevicePathFromHandle (DriverHandle);\r
+ if (DevicePath == NULL) {\r
+ return NULL;\r
+ }\r
+ //\r
+ // Compute the size of the device path in bytes\r
+ //\r
+ DevicePathSize = GetDevicePathSize (DevicePath);\r
}\r
\r
- //\r
- // Compute the size of the device path in bytes\r
- //\r
- DevicePathSize = GetDevicePathSize (DevicePath);\r
-\r
//\r
// GUID=<HexCh>32&NAME=<Char>NameLength&PATH=<HexChar>DevicePathSize <Null>\r
// | 5 | sizeof (EFI_GUID) * 2 | 6 | NameStrLen*4 | 6 | DevicePathSize * 2 | 1 |\r