From 0c41d28e598356f083c308f359d435e63a6e0ef9 Mon Sep 17 00:00:00 2001 From: Jaben Carsey Date: Thu, 22 May 2014 22:06:41 +0000 Subject: 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 Reviewed-by: Tapan Shah Reviewed-by: Erik Bjorge git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15547 6f19259b-4bc3-4df7-8a09-765794883524 --- ShellPkg/Application/Shell/Shell.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'ShellPkg/Application') 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); -- cgit v1.2.3