From bfd59ca08b91d279b7646d00c209e4bb527f32c6 Mon Sep 17 00:00:00 2001 From: "fredrik@DOLDA2000.COM" Date: Fri, 29 Apr 2005 02:24:31 +0000 Subject: [PATCH] Fixed up printdn. git-svn-id: svn+ssh://svn.dolda2000.com/srv/svn/repos/src/icmp-dn@217 959494ce-11ee-0310-bf91-de5d638817bd --- idnlookup.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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"); } } -- 2.11.0