projects
/
platform
/
upstream
/
efl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8063b86
)
elm_code_text: Return empty string on 0 length.
author
Alastair Poole
<netstar@gmail.com>
Sun, 5 Jan 2020 17:36:33 +0000
(17:36 +0000)
committer
Jongmin Lee
<jm105.lee@samsung.com>
Sun, 5 Jan 2020 21:54:53 +0000
(06:54 +0900)
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
patch
|
blob
|
history
diff --git
a/src/lib/elementary/elm_code_text.c
b/src/lib/elementary/elm_code_text.c
index
d27081a
..
56fc1a0
100644
(file)
--- 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;