This commit is contained in:
ChunEon Park 2015-07-11 00:21:20 +09:00
parent 70d14f6665
commit 3ff6ae8e71
1 changed files with 5 additions and 1 deletions

View File

@ -469,7 +469,7 @@ indent_xml_space_get(indent_data *id, Evas_Object *entry)
const char *quot = "\"";
int quot_len = 1; // strlen(""");
char *cur = (char *) src;
char *end = ((char *) src) + pos;
char *end = ((char *) src) + pos - 1;
while (cur && (cur <= end))
{
@ -504,6 +504,10 @@ indent_xml_space_get(indent_data *id, Evas_Object *entry)
else cur++;
}
/* If current Cursor move back placed in just prior to </xxx>
Then we need to depth down one more */
if (!strncmp((src + pos), "</", 2)) depth--;
if (depth < 0) depth = 0;
depth *= TAB_SPACE;
free(src);