summaryrefslogtreecommitdiff
path: root/edk2/ShellPkg/Library/UefiShellLib
diff options
context:
space:
mode:
authorjcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524>2012-07-23 16:32:09 +0000
committerjcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524>2012-07-23 16:32:09 +0000
commitd3f14bc6cc93b90ed31082c2e5617f94ed1165c5 (patch)
tree13ba32107da7edcfcb0e427cc5ccda89ed069e86 /edk2/ShellPkg/Library/UefiShellLib
parenta58e009ad35c620d59d99fc80d4ae60240445706 (diff)
ShellPkg: Update string to number conversion to correctly stop at spaces if so requested.
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@13548 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'edk2/ShellPkg/Library/UefiShellLib')
-rw-r--r--edk2/ShellPkg/Library/UefiShellLib/UefiShellLib.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/edk2/ShellPkg/Library/UefiShellLib/UefiShellLib.c b/edk2/ShellPkg/Library/UefiShellLib/UefiShellLib.c
index 1929349b2..75ecfa503 100644
--- a/edk2/ShellPkg/Library/UefiShellLib/UefiShellLib.c
+++ b/edk2/ShellPkg/Library/UefiShellLib/UefiShellLib.c
@@ -3650,10 +3650,10 @@ InternalShellStrHexToUint64 (
Result = 0;
//
- // Skip spaces if requested
+ // stop at spaces if requested
//
- while (StopAtSpace && *String == L' ') {
- String++;
+ if (StopAtSpace && *String == L' ') {
+ break;
}
while (ShellIsHexaDecimalDigitCharacter (*String)) {