syntax_color - append string only if it's valid.

This commit is contained in:
ChunEon Park 2014-05-22 18:56:43 +09:00
parent a7deebef00
commit 5fc6fce8ff
1 changed files with 2 additions and 1 deletions

View File

@ -658,7 +658,8 @@ color_apply(color_data *cd, const char *src, int length)
//escape empty string
if (cur[0] == ' ')
{
eina_strbuf_append_length(strbuf, prev, cur - prev);
if (cur > prev)
eina_strbuf_append_length(strbuf, prev, cur - prev);
eina_strbuf_append_char(strbuf, ' ');
++cur;
prev = cur;