diff options
author | koekeishiya <aasvi93@hotmail.com> | 2017-08-07 21:05:19 +0200 |
---|---|---|
committer | koekeishiya <aasvi93@hotmail.com> | 2017-08-07 21:05:19 +0200 |
commit | 8113af718e1e209f83fa681296293849a19df18a (patch) | |
tree | fd9568788fc778acab0058d0441730e3587843ad /src | |
parent | dc77705efaece4ee4f7138159760353ebb9cee06 (diff) | |
download | skhd-8113af718e1e209f83fa681296293849a19df18a.tar.gz skhd-8113af718e1e209f83fa681296293849a19df18a.zip |
properly cancel parsing upon error
Diffstat (limited to 'src')
-rw-r--r-- | src/parse.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/parse.c b/src/parse.c index bac0215..559d23d 100644 --- a/src/parse.c +++ b/src/parse.c @@ -196,6 +196,9 @@ parse_config(struct parser *parser) (parser_check(parser, Token_Key))) { current_hotkey->next = parse_hotkey(parser); current_hotkey = current_hotkey->next; + if(parser->error) { + return NULL; + } } else { fprintf(stderr, "(#%d:%d) expected token 'Token_Modifier', 'Token_Key_Hex' or 'Token_Key', but got '%.*s'\n", parser->current_token.line, parser->current_token.cursor, |