summaryrefslogtreecommitdiff
path: root/ShellPkg/Application/Shell/Shell.c
diff options
context:
space:
mode:
Diffstat (limited to 'ShellPkg/Application/Shell/Shell.c')
-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);