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:
Jaben Carsey 2014-05-22 22:06:41 +00:00 committed by jcarsey
parent b5ce69c3da
commit 0c41d28e59
1 changed files with 5 additions and 5 deletions

View File

@ -1378,14 +1378,14 @@ StripUnreplacedEnvironmentVariables(
}
ASSERT(FirstPercent < FirstQuote);
if (SecondPercent < FirstQuote) {
FirstPercent[0] = L'\"';
SecondPercent[0] = L'\"';
//
// We need to remove from FirstPercent to SecondPercent
//
CopyMem(FirstPercent, SecondPercent + 1, StrSize(SecondPercent + 1));
//
// dont need to update the locator. both % characters are gone.
//
CopyMem(FirstPercent + 1, SecondPercent, StrSize(SecondPercent));
CurrentLocator = FirstPercent + 2;
continue;
}
ASSERT(FirstQuote < SecondPercent);