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)
diff --git a/testSAX.c b/testSAX.c
index f394078..009c6c1 100644
--- a/testSAX.c
+++ b/testSAX.c
@@ -918,7 +918,7 @@
}
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 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++;