ajwillia-ms pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=4596d795aa6f627605f72d11d1fa6b404e2a81c6

commit 4596d795aa6f627605f72d11d1fa6b404e2a81c6
Author: Andy Williams <[email protected]>
Date:   Fri Feb 10 20:16:31 2017 +0000

    elm_code: Fix syntax crash on trailing newline in multiline macro
    
    @fix
---
 src/lib/elementary/elm_code_syntax.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/elementary/elm_code_syntax.c 
b/src/lib/elementary/elm_code_syntax.c
index cabcd86..80adead 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)
    else if (previous_type == ELM_CODE_TOKEN_TYPE_PREPROCESSOR)
      {
         elm_code_line_token_add(line, 0, length, 1, 
ELM_CODE_TOKEN_TYPE_PREPROCESSOR);
-        if (content[length-1] == '\\')
+        if (length >= 1 && content[length-1] == '\\')
           {
              Elm_Code_Token *token = eina_list_last_data_get(line->tokens);
              token->continues = EINA_TRUE;

-- 


Reply via email to