summaryrefslogtreecommitdiff
path: root/libezxml/src/ezxml.c
diff options
context:
space:
mode:
Diffstat (limited to 'libezxml/src/ezxml.c')
-rw-r--r--libezxml/src/ezxml.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libezxml/src/ezxml.c b/libezxml/src/ezxml.c
index 52deb95..967d535 100644
--- a/libezxml/src/ezxml.c
+++ b/libezxml/src/ezxml.c
@@ -426,7 +426,8 @@ static short ezxml_internal_dtd(ezxml_root_t root, char *s, size_t len)
else *s = '\0'; // null terminate tag name
for (i = 0; root->attr[i] && strcmp(n, root->attr[i][0]); i++);
- while (*(n = ++s + strspn(s, EZXML_WS)) && *n != '>') {
+ ++s; // ansi cpr
+ while (*(n = s + strspn(s, EZXML_WS)) && *n != '>') {
if (*(s = n + strcspn(n, EZXML_WS))) *s = '\0'; // attr name
else { ezxml_err(root, t, "malformed <!ATTLIST"); break; }
@@ -467,6 +468,7 @@ static short ezxml_internal_dtd(ezxml_root_t root, char *s, size_t len)
root->attr[i][j + 1] = (v) ? ezxml_decode(v, root->ent, *c)
: NULL;
root->attr[i][j] = n; // attribute name
+ ++s;
}
}
else if (! strncmp(s, "<!--", 4)) s = strstr(s + 4, "-->"); // comments