]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ShellPkg: Update string to number conversion to correctly stop at spaces if so requested.
authorjcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 23 Jul 2012 16:32:09 +0000 (16:32 +0000)
committerjcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524>
Mon, 23 Jul 2012 16:32:09 +0000 (16:32 +0000)
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: jaben carsey <jaben.carsey@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13548 6f19259b-4bc3-4df7-8a09-765794883524

ShellPkg/Library/UefiShellLib/UefiShellLib.c

index 1929349b2038aa2a7f4f197eb532ef442d7459b7..75ecfa503e82d2daed41d82c4ae955e3c399c05c 100644 (file)
@@ -3650,10 +3650,10 @@ InternalShellStrHexToUint64 (
   Result = 0;\r
 \r
   //\r
-  // Skip spaces if requested\r
+  // stop at spaces if requested\r
   //\r
-  while (StopAtSpace && *String == L' ') {\r
-    String++;\r
+  if (StopAtSpace && *String == L' ') {\r
+    break;\r
   }\r
 \r
   while (ShellIsHexaDecimalDigitCharacter (*String)) {\r