Skip to content

Commit

Permalink
Cfg Parser: Allow whitespace before the "include_file" statement
Browse files Browse the repository at this point in the history
Fixes #2892

(cherry picked from commit c477e49)
  • Loading branch information
liviuchircu committed Sep 1, 2022
1 parent 86fbeed commit ff175bb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cfg_pp.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,11 @@ int mk_included_file_path(char *line, int line_len, const char *current_dir,
char *p = NULL, enclose = 0;
int len1, len2, fplen;

while (line_len > 0 && is_ws(*line)) {
line_len--;
line++;
}

if (line_len > include_v1.len &&
!memcmp(line, include_v1.s, include_v1.len)) {
p = line + include_v1.len;
Expand Down

0 comments on commit ff175bb

Please sign in to comment.