* Fix bug in font string parsing that can result in a crash if a
font element is long enough.
* Fiix convert rgba8888 -> a8 bug so it wont crash.
+
+2011-02-21 Carsten Haitzler (The Rasterman)
+
+ * Fixed bug with memory access of old utf8 string when
+ comparing prev and cur state with text obj.
+
return;
MAGIC_CHECK_END();
- if ((o->cur.utf8_text) && (_text) &&
- (!strcmp(o->cur.utf8_text, _text)))
- {
- return;
- }
+ if ((o->cur.utf8_text) && (_text) && (!strcmp(o->cur.utf8_text, _text)))
+ return;
text = eina_unicode_utf8_to_unicode(_text, &len);
if (!text) text = eina_unicode_strdup(EINA_UNICODE_EMPTY_STRING);
{
_evas_object_text_layout(obj, o, text);
eina_stringshare_replace(&o->cur.utf8_text, _text);
+ o->prev.utf8_text = NULL;
}
else
{
if (o->changed)
{
if ((o->cur.size != o->prev.size) ||
- ((o->cur.font) && (o->prev.font) &&
- (strcmp(o->cur.font, o->prev.font))) ||
- ((o->cur.font) && (!o->prev.font)) ||
- ((!o->cur.font) && (o->prev.font)) ||
- ((o->cur.utf8_text) && (o->prev.utf8_text) &&
- (strcmp(o->cur.utf8_text, o->prev.utf8_text))) ||
- ((o->cur.utf8_text) && (!o->prev.utf8_text)) ||
- ((!o->cur.utf8_text) && (o->prev.utf8_text)) ||
+ ((o->cur.font != o->prev.font)) ||
+ ((o->cur.utf8_text != o->prev.utf8_text)) ||
((o->cur.style != o->prev.style)) ||
((o->cur.shadow.r != o->prev.shadow.r)) ||
((o->cur.shadow.g != o->prev.shadow.g)) ||