]> git.ipfire.org Git - thirdparty/ldns.git/commitdiff
fixed root label str2rdf
authorJelte Jansen <jeltejan@NLnetLabs.nl>
Thu, 10 Mar 2005 13:47:37 +0000 (13:47 +0000)
committerJelte Jansen <jeltejan@NLnetLabs.nl>
Thu, 10 Mar 2005 13:47:37 +0000 (13:47 +0000)
str2host.c

index c13be7e9cdeff9f1487e40beb316b3d5fe45ab79..526a439764b5bb48c1fccae11df1667515d8ff45 100644 (file)
@@ -189,7 +189,7 @@ ldns_str2rdf_dname(ldns_rdf **d, const char *str)
        
        /* root label */
        if (1 == len) {
-               *d = ldns_rdf_new_frm_data(LDNS_RDF_TYPE_DNAME, 1, "."); 
+               *d = ldns_rdf_new_frm_data(LDNS_RDF_TYPE_DNAME, 1, "\0"); 
                return LDNS_STATUS_OK;
        }
 
@@ -245,7 +245,7 @@ ldns_str2rdf_dname(ldns_rdf **d, const char *str)
        }
 
        /* add root label if last char was not '.' */
-       if (str[strlen(str)-1] != '.') {
+       if (str[strlen(str)-1] != '\0') {
                len += label_len + 1;
                *pq = label_len;
                *q = 0;