mirror of https://github.com/acidanthera/audk.git
ShellPkg: replace unrecognized Environment Variables with empty quotes so commands or applications know something existed.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jaben Carsey <Jaben.carsey@intel.com> Reviewed-by: Tapan Shah <tapandshah@hp.com> Reviewed-by: Erik Bjorge <erik.c.bjorge@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15547 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
b5ce69c3da
commit
0c41d28e59
|
@ -1378,14 +1378,14 @@ StripUnreplacedEnvironmentVariables(
|
||||||
}
|
}
|
||||||
ASSERT(FirstPercent < FirstQuote);
|
ASSERT(FirstPercent < FirstQuote);
|
||||||
if (SecondPercent < FirstQuote) {
|
if (SecondPercent < FirstQuote) {
|
||||||
|
FirstPercent[0] = L'\"';
|
||||||
|
SecondPercent[0] = L'\"';
|
||||||
|
|
||||||
//
|
//
|
||||||
// We need to remove from FirstPercent to SecondPercent
|
// We need to remove from FirstPercent to SecondPercent
|
||||||
//
|
//
|
||||||
CopyMem(FirstPercent, SecondPercent + 1, StrSize(SecondPercent + 1));
|
CopyMem(FirstPercent + 1, SecondPercent, StrSize(SecondPercent));
|
||||||
|
CurrentLocator = FirstPercent + 2;
|
||||||
//
|
|
||||||
// dont need to update the locator. both % characters are gone.
|
|
||||||
//
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
ASSERT(FirstQuote < SecondPercent);
|
ASSERT(FirstQuote < SecondPercent);
|
||||||
|
|
Loading…
Reference in New Issue