aboutsummaryrefslogtreecommitdiff
path: root/src/parse.c
diff options
context:
space:
mode:
authorkoekeishiya <aasvi93@hotmail.com>2017-08-07 21:05:19 +0200
committerkoekeishiya <aasvi93@hotmail.com>2017-08-07 21:05:19 +0200
commit8113af718e1e209f83fa681296293849a19df18a (patch)
treefd9568788fc778acab0058d0441730e3587843ad /src/parse.c
parentdc77705efaece4ee4f7138159760353ebb9cee06 (diff)
downloadskhd-8113af718e1e209f83fa681296293849a19df18a.tar.gz
skhd-8113af718e1e209f83fa681296293849a19df18a.zip
properly cancel parsing upon error
Diffstat (limited to 'src/parse.c')
-rw-r--r--src/parse.c3
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,