summaryrefslogtreecommitdiff
path: root/src/lib/elementary/elm_code_syntax.c
diff options
context:
space:
mode:
authorAndy Williams <andy@andywilliams.me>2017-02-10 20:16:31 +0000
committerAndy Williams <andy@andywilliams.me>2017-02-10 20:16:31 +0000
commit4596d795aa6f627605f72d11d1fa6b404e2a81c6 (patch)
tree49cff1d1fa11c243039b7ec312cd5a93830a95e2 /src/lib/elementary/elm_code_syntax.c
parent44804a9579e0e817127f3d070c3d050bedaa73e9 (diff)
elm_code: Fix syntax crash on trailing newline in multiline macro
@fix
Diffstat (limited to '')
-rw-r--r--src/lib/elementary/elm_code_syntax.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/elementary/elm_code_syntax.c b/src/lib/elementary/elm_code_syntax.c
index cabcd86cc8..80adead56c 100644
--- a/src/lib/elementary/elm_code_syntax.c
+++ b/src/lib/elementary/elm_code_syntax.c
@@ -167,7 +167,7 @@ elm_code_syntax_parse_line(Elm_Code_Syntax *syntax, Elm_Code_Line *line)
167 else if (previous_type == ELM_CODE_TOKEN_TYPE_PREPROCESSOR) 167 else if (previous_type == ELM_CODE_TOKEN_TYPE_PREPROCESSOR)
168 { 168 {
169 elm_code_line_token_add(line, 0, length, 1, ELM_CODE_TOKEN_TYPE_PREPROCESSOR); 169 elm_code_line_token_add(line, 0, length, 1, ELM_CODE_TOKEN_TYPE_PREPROCESSOR);
170 if (content[length-1] == '\\') 170 if (length >= 1 && content[length-1] == '\\')
171 { 171 {
172 Elm_Code_Token *token = eina_list_last_data_get(line->tokens); 172 Elm_Code_Token *token = eina_list_last_data_get(line->tokens);
173 token->continues = EINA_TRUE; 173 token->continues = EINA_TRUE;