mirror of https://github.com/acidanthera/audk.git
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;
|
||||
}
|
||||
|
||||
for (Walker = *CleanString; Walker != NULL && *Walker != CHAR_NULL; Walker++) {
|
||||
for (Walker = *CleanString; Walker != NULL && *Walker != CHAR_NULL;) {
|
||||
if (*Walker == L'\"') {
|
||||
CopyMem (Walker, Walker+1, StrSize (Walker) - sizeof (Walker[0]));
|
||||
} else {
|
||||
Walker++;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue