Edc parser: correct detection of current description.

Summary:
Added check, if the entry cursor is go out of the description
block, will be returned NULL description_name.

Reviewers: Hermet

Differential Revision: https://phab.enlightenment.org/D2681
This commit is contained in:
Mykyta Biliavskyi 2015-06-15 14:08:51 +09:00 committed by ChunEon Park
parent 3ff81bce00
commit 31d07e5590
1 changed files with 3 additions and 2 deletions

View File

@ -278,7 +278,7 @@ cur_state_thread_blocking(void *data, Ecore_Thread *thread EINA_UNUSED)
continue;
}
//Check whether outside of part or group
//Check whether outside of description or part or group
if ((*p == '}') && (p < end))
{
bracket--;
@ -286,6 +286,7 @@ cur_state_thread_blocking(void *data, Ecore_Thread *thread EINA_UNUSED)
if (bracket == 1) group_name = NULL;
else if (bracket == 3) part_name = NULL;
else if (bracket == 4) description_name = NULL;
continue;
}
@ -365,7 +366,7 @@ cur_state_thread_blocking(void *data, Ecore_Thread *thread EINA_UNUSED)
group_name = eina_stringshare_add_length(group_name, group_name_len);
if (description_name)
description_name = eina_stringshare_add_length(description_name, description_name_len);
td->part_name = part_name;
td->group_name = group_name;
td->state_name = description_name;