]> wimlib.net Git - wimlib/commitdiff
xmlproc: fix parsing empty elements
authorEric Biggers <ebiggers3@gmail.com>
Fri, 31 Mar 2023 07:44:09 +0000 (00:44 -0700)
committerEric Biggers <ebiggers3@gmail.com>
Fri, 31 Mar 2023 07:44:09 +0000 (00:44 -0700)
src/xmlproc.c

index b0045aec04aa003b4d2b1cdfd9a4b8e9d9d9bb5e..fdd5ce96514100fb7061506d9bfc40f65cd13d07 100644 (file)
@@ -548,7 +548,7 @@ parse_element(const tchar **pp, struct xml_node *parent, int depth,
        CHECK(*p == '<');
        p++;
        name_start = p;
-       while (!is_whitespace(*p) && *p != '>' && *p != '\0')
+       while (!is_whitespace(*p) && *p != '>' && *p != '/' && *p != '\0')
                p++;
        name_len = p - name_start;
        CHECK(name_len > 0);