]> git.proxmox.com Git - mirror_edk2.git/blobdiff - BaseTools/Source/C/DevicePath/DevicePathFromText.c
BaseTools: Fix bug when converting iSCSI node
[mirror_edk2.git] / BaseTools / Source / C / DevicePath / DevicePathFromText.c
index 776cf051b0d955044553461d20b457378ed897f1..fd310c7d0f75065ed910f143c0a7683f3f42962e 100644 (file)
@@ -2426,7 +2426,7 @@ DevPathFromTextiSCSI (
 \r
   ISCSIDevPath->LoginOption      = (UINT16) Options;\r
 \r
-  if (StrCmp (ProtocolStr, L"TCP") == 0) {\r
+  if (IS_NULL (*ProtocolStr) || (StrCmp (ProtocolStr, L"TCP") == 0)) {\r
     ISCSIDevPath->NetworkProtocol = 0;\r
   } else {\r
     //\r