ShellPkg: Update the ‘for’ command to check number length correctly with trailing spaces.

This fix corrects the logic that checks number length such that is functions correctly without a trailing space.

Signed-off-by: jcarsey
Reviewed-by: geekboy15a



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12736 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
jcarsey 2011-11-17 21:38:20 +00:00
parent f6ec0c771a
commit 2d3759d8b5
1 changed files with 1 additions and 1 deletions

View File

@ -42,7 +42,7 @@ ShellIsValidForNumber (
}
if (StrLen(Number) >= 7) {
if (StrStr(Number, L" ") != NULL && (StrStr(Number, L" ") - Number) >= 7) {
if ((StrStr(Number, L" ") == NULL) || (((StrStr(Number, L" ") != NULL) && (StrStr(Number, L" ") - Number) >= 7))) {
return (FALSE);
}
}