summaryrefslogtreecommitdiff
path: root/ShellPkg
diff options
context:
space:
mode:
authorJaben Carsey <Jaben.carsey@intel.com>2014-05-22 22:06:41 +0000
committerjcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524>2014-05-22 22:06:41 +0000
commit0c41d28e598356f083c308f359d435e63a6e0ef9 (patch)
tree1a1d5ab82da4f79e8a913040feef8ea007036cee /ShellPkg
parentb5ce69c3daf4b8e32a183fd0e53b657c70d6998a (diff)
downloadedk2-platforms-0c41d28e598356f083c308f359d435e63a6e0ef9.tar.xz
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
Diffstat (limited to 'ShellPkg')
-rw-r--r--ShellPkg/Application/Shell/Shell.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/ShellPkg/Application/Shell/Shell.c b/ShellPkg/Application/Shell/Shell.c
index 951d31e82b..4abeafcd44 100644
--- a/ShellPkg/Application/Shell/Shell.c
+++ b/ShellPkg/Application/Shell/Shell.c
@@ -1378,14 +1378,14 @@ StripUnreplacedEnvironmentVariables(
}
ASSERT(FirstPercent < FirstQuote);
if (SecondPercent < FirstQuote) {
- //
- // We need to remove from FirstPercent to SecondPercent
- //
- CopyMem(FirstPercent, SecondPercent + 1, StrSize(SecondPercent + 1));
+ FirstPercent[0] = L'\"';
+ SecondPercent[0] = L'\"';
//
- // dont need to update the locator. both % characters are gone.
+ // We need to remove from FirstPercent to SecondPercent
//
+ CopyMem(FirstPercent + 1, SecondPercent, StrSize(SecondPercent));
+ CurrentLocator = FirstPercent + 2;
continue;
}
ASSERT(FirstQuote < SecondPercent);