mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-01 09:50:52 +00:00
ntdll: Skip xml comments in manifests.
This commit is contained in:
parent
214fb6e84e
commit
272af8fa1e
1 changed files with 22 additions and 5 deletions
|
@ -541,14 +541,31 @@ static BOOL next_xml_elem(xmlbuf_t* xmlbuf, xmlstr_t* elem)
|
|||
{
|
||||
const char* ptr;
|
||||
|
||||
ptr = memchr(xmlbuf->ptr, '<', xmlbuf->end - xmlbuf->ptr);
|
||||
if (!ptr)
|
||||
for (;;)
|
||||
{
|
||||
xmlbuf->ptr = xmlbuf->end;
|
||||
return FALSE;
|
||||
ptr = memchr(xmlbuf->ptr, '<', xmlbuf->end - xmlbuf->ptr);
|
||||
if (!ptr)
|
||||
{
|
||||
xmlbuf->ptr = xmlbuf->end;
|
||||
return FALSE;
|
||||
}
|
||||
ptr++;
|
||||
if (ptr + 3 < xmlbuf->end && !strncmp( ptr, "!--", 3 )) /* skip comment */
|
||||
{
|
||||
for (ptr += 3; ptr + 3 <= xmlbuf->end; ptr++)
|
||||
if (ptr[0] == '-' && ptr[1] == '-' && ptr[2] == '>') break;
|
||||
|
||||
if (ptr + 3 > xmlbuf->end)
|
||||
{
|
||||
xmlbuf->ptr = xmlbuf->end;
|
||||
return FALSE;
|
||||
}
|
||||
xmlbuf->ptr = ptr + 3;
|
||||
}
|
||||
else break;
|
||||
}
|
||||
|
||||
xmlbuf->ptr = ++ptr;
|
||||
xmlbuf->ptr = ptr;
|
||||
while (ptr < xmlbuf->end && !isxmlspace(*ptr) && *ptr != '>')
|
||||
ptr++;
|
||||
|
||||
|
|
Loading…
Reference in a new issue