Commit c8be4307 authored by Matthieu Boutier's avatar Matthieu Boutier Committed by Juliusz Chroboczek

Fix error handling in parse_option.

This was causing the parser to ignore the rest of the file after an
unknown option.
parent b83db0b9
...@@ -680,12 +680,12 @@ parse_option(int c, gnc_t gnc, void *closure, char *token) ...@@ -680,12 +680,12 @@ parse_option(int c, gnc_t gnc, void *closure, char *token)
c = skip_whitespace(c, gnc, closure); c = skip_whitespace(c, gnc, closure);
if(c < 0 || c == '\n' || c == '#') { if(c < 0 || c == '\n' || c == '#') {
c = skip_to_eol(c, gnc, closure); c = skip_to_eol(c, gnc, closure);
return 1; return c;
} }
/* Fall through */ /* Fall through */
error: error:
return -1; return -2;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment