X-Git-Url: http://dolda2000.com/gitweb/?a=blobdiff_plain;f=idnlookup.c;h=27b26fdef4dbd50d60d034f724d180fcce06cc1d;hb=bfd59ca08b91d279b7646d00c209e4bb527f32c6;hp=43518ef28fae6ff1bb8fe205e4a34425292eb8bd;hpb=9cc7607e53dd79a74ed52c044a2bd8f39598b53c;p=icmp-dn.git diff --git a/idnlookup.c b/idnlookup.c index 43518ef..27b26fd 100644 --- a/idnlookup.c +++ b/idnlookup.c @@ -73,11 +73,13 @@ void printdn(FILE *f, unsigned char *dnbuf, size_t size) fprintf(stderr, "domain name decompression not implemented, aborting\n"); exit(1); } - printf("%.*s.", (int)*p, p + 1); + fprintf(f, "%.*s", (int)*p, p + 1); p += 1 + (int)*p; + if(*p != 0) + fprintf(f, "."); } p++; - printf("\n"); + fprintf(f, "\n"); } }