mirror of https://github.com/acidanthera/audk.git
ShellPkg: Fix 'for' command fail with multiple fields.
When multiple fields are found in 'for' command return invalid parameters error. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Qiu Shumin <shumin.qiu@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18416 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
50e7d3d90d
commit
8337590c42
|
@ -438,6 +438,11 @@ ShellCommandRunFor (
|
|||
gEfiShellParametersProtocol->Argv[2]) == 0) {
|
||||
for (LoopVar = 0x3 ; LoopVar < gEfiShellParametersProtocol->Argc ; LoopVar++) {
|
||||
ASSERT((ArgSet == NULL && ArgSize == 0) || (ArgSet != NULL));
|
||||
if (StrStr (gEfiShellParametersProtocol->Argv[LoopVar], L")") != NULL &&
|
||||
(LoopVar + 1) < gEfiShellParametersProtocol->Argc
|
||||
) {
|
||||
return (SHELL_INVALID_PARAMETER);
|
||||
}
|
||||
if (ArgSet == NULL) {
|
||||
// ArgSet = StrnCatGrow(&ArgSet, &ArgSize, L"\"", 0);
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue