mirror of
https://github.com/ventoy/Ventoy.git
synced 2025-04-01 10:13:47 -04:00
Support escaped quotes (\") in ventoy.json. (#1062)
This commit is contained in:
parent
9615e7eaa0
commit
84ec4b0de4
@ -152,6 +152,23 @@ static int vtoy_json_parse_string
|
|||||||
return JSON_FAILED;
|
return JSON_FAILED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (*(pcPos - 1) == '\\')
|
||||||
|
{
|
||||||
|
for (pcPos++; *pcPos; pcPos++)
|
||||||
|
{
|
||||||
|
if (*pcPos == '"' && *(pcPos - 1) != '\\')
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (*pcPos == 0 || pcPos < pcTmp)
|
||||||
|
{
|
||||||
|
json_debug("Invalid quotes string %s.", pcData);
|
||||||
|
return JSON_FAILED;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
*ppcEnd = pcPos + 1;
|
*ppcEnd = pcPos + 1;
|
||||||
uiLen = (grub_uint32_t)(unsigned long)(pcPos - pcTmp);
|
uiLen = (grub_uint32_t)(unsigned long)(pcPos - pcTmp);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user