diff options
author | William M. Brack <wbrack@src.gnome.org> | 2004-06-02 03:41:21 +0000 |
---|---|---|
committer | William M. Brack <wbrack@src.gnome.org> | 2004-06-02 03:41:21 +0000 |
commit | 06112d18ff81ce72781517733110101eb17c8f07 (patch) | |
tree | c71084b88f856e507e040687ad7450cf570b29b1 /testSAX.c | |
parent | 669adfcd3af5dfda873b10119d44202a7450bb20 (diff) | |
download | libxml2-06112d18ff81ce72781517733110101eb17c8f07.tar.gz |
fixed problem with attribute listing (bug 142674) and added macro
* testSAX.c: fixed problem with attribute listing (bug 142674)
and added macro LIBXML_TEST_VERSION to assure xmlInitParser
gets called (bug 142686)
Diffstat (limited to 'testSAX.c')
-rw-r--r-- | testSAX.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -918,7 +918,7 @@ startElementNsDebug(void *ctx ATTRIBUTE_UNUSED, } fprintf(stdout, ", %d, %d", nb_attributes, nb_defaulted); if (attributes != NULL) { - for (i = 0;i < nb_attributes;i += 5) { + for (i = 0;i < nb_attributes * 5;i += 5) { if (attributes[i + 1] != NULL) fprintf(stdout, ", %s:%s='", attributes[i + 1], attributes[i]); else @@ -1118,6 +1118,8 @@ int main(int argc, char **argv) { int i; int files = 0; + LIBXML_TEST_VERSION /* be safe, plus calls xmlInitParser */ + for (i = 1; i < argc ; i++) { if ((!strcmp(argv[i], "-debug")) || (!strcmp(argv[i], "--debug"))) debug++; |