- Fix that ldns_zone_new_frm_fp_l counts the line number for an empty

line after a comment.
This commit is contained in:
W.C.A. Wijngaards 2021-07-21 13:58:07 +02:00
parent d300bc8eee
commit ca5baef433
2 changed files with 7 additions and 0 deletions

View file

@ -1,3 +1,7 @@
21 July 2021: Wouter
- Fix that ldns_zone_new_frm_fp_l counts the line number for an empty
line after a comment.
16 July 2021: George
- Introduce 'http-user-agent:' and 'hide-http-user-agent:' options.

View file

@ -149,6 +149,9 @@ sldns_fget_token_l(FILE *f, char *token, const char *delim, size_t limit, int *l
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;