diff --git a/Changelog b/Changelog index 2eac649e..6966b0ec 100644 --- a/Changelog +++ b/Changelog @@ -28,6 +28,8 @@ * PR #134 Miscellaneous spelling fixes. Thanks jsoref! * Fix that ldns-read-zone and ldns_zone_new_frm_fp_l properly return the $INCLUDE not implemented error. + * Fix that ldns-read-zone and ldns_zone_new_frm_fp_l count the line + number for an empty line after a comment. 1.7.1 2019-07-26 * bugfix: Manage verification paths for OpenSSL >= 1.1.0 diff --git a/parse.c b/parse.c index 3c737620..9698ba71 100644 --- a/parse.c +++ b/parse.c @@ -187,6 +187,9 @@ ldns_fget_token_l_st(FILE *f, char **token, size_t *limit, bool fixed if (c != '\0' && c != '\n') { *t++ = c; } + if (c == '\n' && line_nr) { + *line_nr = *line_nr + 1; + } if (c == '\\' && prev_c == '\\') prev_c = 0; else prev_c = c;