Revision: 14997
http://sourceforge.net/p/edk2/code/14997
Author: jcarsey
Date: 2013-12-17 21:40:41 +0000 (Tue, 17 Dec 2013)
Log Message:
-----------
ShellPkg: Fix "for" command statement initialization.
The shell was failing to correctly parse up to the space only for
?\226?\128?\156run (1 3)?\226?\128?\157 and also losing the space for
?\226?\128?\156in ?\226?\128?\157 a b?\226?\128?\157 c?\226?\128?\157 for loop
initialization. This fixes for initialization to be correct.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <[email protected]>
Reviewed-by: Erik Bjorge <[email protected]>
Modified Paths:
--------------
trunk/edk2/ShellPkg/Library/UefiShellLevel1CommandsLib/For.c
Modified: trunk/edk2/ShellPkg/Library/UefiShellLevel1CommandsLib/For.c
===================================================================
--- trunk/edk2/ShellPkg/Library/UefiShellLevel1CommandsLib/For.c
2013-12-17 18:17:55 UTC (rev 14996)
+++ trunk/edk2/ShellPkg/Library/UefiShellLevel1CommandsLib/For.c
2013-12-17 21:40:41 UTC (rev 14997)
@@ -270,7 +270,7 @@
{
UINT64 RetVal;
- if (!EFI_ERROR(ShellConvertStringToUint64(String, &RetVal, FALSE, FALSE))) {
+ if (!EFI_ERROR(ShellConvertStringToUint64(String, &RetVal, FALSE, TRUE))) {
return ((UINTN)RetVal);
}
return ((UINTN)(-1));
@@ -370,11 +370,7 @@
gEfiShellParametersProtocol->Argv[2]) == 0) {
for (LoopVar = 0x3 ; LoopVar < gEfiShellParametersProtocol->Argc ;
LoopVar++) {
ASSERT((ArgSet == NULL && ArgSize == 0) || (ArgSet != NULL));
- if (ArgSet == NULL) {
- // ArgSet = StrnCatGrow(&ArgSet, &ArgSize, L"\"", 0);
- } else {
- ArgSet = StrnCatGrow(&ArgSet, &ArgSize, L" \"", 0);
- }
+ ArgSet = StrnCatGrow(&ArgSet, &ArgSize, L" \"", 0);
if (StrStr(gEfiShellParametersProtocol->Argv[LoopVar], L"*") != NULL
||StrStr(gEfiShellParametersProtocol->Argv[LoopVar], L"?") != NULL
||StrStr(gEfiShellParametersProtocol->Argv[LoopVar], L"[") != NULL
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits