mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-27 07:34:06 +02:00
ShellPkg: ShellLevel2StripQuotes: Strip consecutive quotes
When a quotation mark was found, the remaining line would be shifted in-place to get rid of it. However, the "walker" index would still be increased and therefore the first character of the shifted part would be skipped. This means a second quotation mark would not be deleted. Signed-off-by: Tormod Volden <debian.tormod@gmail.com>
This commit is contained in:
parent
df884297fd
commit
b21cf3bd5b
@ -335,9 +335,11 @@ ShellLevel2StripQuotes (
|
|||||||
return EFI_OUT_OF_RESOURCES;
|
return EFI_OUT_OF_RESOURCES;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (Walker = *CleanString; Walker != NULL && *Walker != CHAR_NULL; Walker++) {
|
for (Walker = *CleanString; Walker != NULL && *Walker != CHAR_NULL;) {
|
||||||
if (*Walker == L'\"') {
|
if (*Walker == L'\"') {
|
||||||
CopyMem (Walker, Walker+1, StrSize (Walker) - sizeof (Walker[0]));
|
CopyMem (Walker, Walker+1, StrSize (Walker) - sizeof (Walker[0]));
|
||||||
|
} else {
|
||||||
|
Walker++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user