From 05916c1532d79d875eac14c71c266e1912582532 Mon Sep 17 00:00:00 2001 From: jcarsey Date: Mon, 23 Jul 2012 16:32:09 +0000 Subject: [PATCH] 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 Reviewed-by: Eric Dong git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13548 6f19259b-4bc3-4df7-8a09-765794883524 --- ShellPkg/Library/UefiShellLib/UefiShellLib.c | 6 +++--- 1 file 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)) { -- 2.39.2