]> git.ipfire.org Git - thirdparty/mtr.git/commitdiff
fix for printing space field in XML.
authorR.E. Wolff <R.E.Wolff@BitWizard.nl>
Sun, 15 Mar 2015 17:38:12 +0000 (18:38 +0100)
committerR.E. Wolff <R.E.Wolff@BitWizard.nl>
Sun, 15 Mar 2015 17:38:12 +0000 (18:38 +0100)
report.c

index badb7658186dd378e250c345e495b2b525b94b34..d6752eb3535f324988eb95b624337cf3bf22f250 100644 (file)
--- a/report.c
+++ b/report.c
@@ -294,7 +294,7 @@ void xml_close(void)
     printf("    <HUB COUNT=\"%d\" HOST=\"%s\">\n", at+1, name);
     for( i=0; i<MAXFLD; i++ ) {
       j = fld_index[fld_active[i]];
-      if (j < 0) continue;
+      if (j <= 0) continue; // Field nr 0, " " shouldn't be printed in this method. 
 
       strcpy(name, "        <%s>");
       strcat(name, data_fields[j].format);