eolian: handle invalid keywords correctly

Before this Eolian segfaulted when an invalid keyword was used.

Fixes T3672.
This commit is contained in:
Daniel Kolesa 2016-05-23 10:49:42 +01:00
parent 83a2ed5e70
commit 4bdb1f73b8
1 changed files with 1 additions and 1 deletions

View File

@ -954,9 +954,9 @@ lex(Eo_Lexer *ls, Eo_Token *tok)
tok->kw = (int)(uintptr_t)eina_hash_find(keyword_map,
str);
ls->column = col + 1;
tok->value.s = eina_stringshare_add(str);
if (at_kw && tok->kw == 0)
eo_lexer_syntax_error(ls, "invalid keyword");
tok->value.s = eina_stringshare_add(str);
return TOK_VALUE;
}
else