mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-15 12:34:30 +00:00
svg_loader: Fix invaild '<' nested check
When Type is DOCTYPE, Child Entities start with '<'. This condition is valid when general Elements (svg, g, path etc) are used. Add a Doctype check to if condition. (There can be various cases related to '<' nested case. But for now, I only add Doctype considering the side effect.)
This commit is contained in:
parent
1336e611c4
commit
0d010bdb6a
1 changed files with 1 additions and 1 deletions
|
@ -388,7 +388,7 @@ bool simpleXmlParse(const char* buf, unsigned bufLength, bool strip, simpleXMLCb
|
||||||
|
|
||||||
if (p) {
|
if (p) {
|
||||||
//Invalid case: '<' nested
|
//Invalid case: '<' nested
|
||||||
if (*p == '<') return false;
|
if (*p == '<' && type != SimpleXMLType::Doctype) return false;
|
||||||
const char *start, *end;
|
const char *start, *end;
|
||||||
|
|
||||||
start = itr + 1 + toff;
|
start = itr + 1 + toff;
|
||||||
|
|
Loading…
Add table
Reference in a new issue