summaryrefslogtreecommitdiff
path: root/ShellPkg/Library
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
commit05916c1532d79d875eac14c71c266e1912582532 (patch)
tree722d5ab33f66bbffc9e01056a74dafb9fac2ec5a /ShellPkg/Library
parentc6a7fef8eacb0e8c035097a532e7d7864e0b997c (diff)
downloadedk2-platforms-05916c1532d79d875eac14c71c266e1912582532.tar.xz
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/edk2@13548 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ShellPkg/Library')
-rw-r--r--ShellPkg/Library/UefiShellLib/UefiShellLib.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ShellPkg/Library/UefiShellLib/UefiShellLib.c b/ShellPkg/Library/UefiShellLib/UefiShellLib.c
index 1929349b20..75ecfa503e 100644
--- a/ShellPkg/Library/UefiShellLib/UefiShellLib.c
+++ b/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)) {