forked from enlightenment/efl
elementary/elm_entry : Fix some wrong logics when getting long string
(over CHUNK_SIZE) from entry. SVN revision: 69987
This commit is contained in:
parent
da1e012dff
commit
6aa59c922d
|
@ -2375,8 +2375,8 @@ _elm_entry_text_get(const Evas_Object *obj, const char *item)
|
|||
{
|
||||
char *tmpbuf;
|
||||
size_t tlen;
|
||||
tlen = strlen(text);
|
||||
tmpbuf = malloc(tlen + wd->append_text_len + 1);
|
||||
tlen = wd->append_text_position;
|
||||
tmpbuf = malloc(wd->append_text_len + 1);
|
||||
if (!tmpbuf)
|
||||
{
|
||||
ERR("Failed to allocate memory for entry's text %p", obj);
|
||||
|
@ -2384,8 +2384,8 @@ _elm_entry_text_get(const Evas_Object *obj, const char *item)
|
|||
}
|
||||
memcpy(tmpbuf, text, tlen);
|
||||
if (wd->append_text_left)
|
||||
memcpy(tmpbuf + tlen, wd->append_text_left, wd->append_text_len);
|
||||
tmpbuf[tlen + wd->append_text_len] = '\0';
|
||||
memcpy(tmpbuf + tlen, wd->append_text_left + wd->append_text_position, wd->append_text_len - tlen);
|
||||
tmpbuf[wd->append_text_len + 1] = '\0';
|
||||
eina_stringshare_replace(&wd->text, tmpbuf);
|
||||
free(tmpbuf);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue