netstar pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=207da69c97d86ccd6f1e354b60b579a3d81f375c
commit 207da69c97d86ccd6f1e354b60b579a3d81f375c Author: Alastair Poole <[email protected]> Date: Sun Jan 5 17:36:33 2020 +0000 elm_code_text: Return empty string on 0 length. Throughout elm_code we rely on this function returning a valid string (unless the line object isn't set/is NULL). --- src/lib/elementary/elm_code_text.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lib/elementary/elm_code_text.c b/src/lib/elementary/elm_code_text.c index d27081a251..56fc1a07c5 100644 --- a/src/lib/elementary/elm_code_text.c +++ b/src/lib/elementary/elm_code_text.c @@ -19,6 +19,9 @@ elm_code_line_text_get(Elm_Code_Line *line, unsigned int *length) if (length) *length = line->length; + if (!line->length) + return ""; + if (line->modified) return line->modified; return line->content; --
