edje: handle case when & is not escaped.
authorcedric <cedric@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 23 Apr 2012 00:34:17 +0000 (00:34 +0000)
committercedric <cedric@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 23 Apr 2012 00:34:17 +0000 (00:34 +0000)
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/edje@70401 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/edje_util.c

index 0dba28f..9c217c8 100644 (file)
@@ -1192,6 +1192,7 @@ edje_object_part_text_escaped_set(Evas_Object *obj, const char *part, const char
                     }
                   else if (*p == 0)
                     {
+                       if (!s) s = esc_start; /* This would happen when there is & that isn't escaped */
                        eina_strbuf_append_length(sbuf, s, p - s);
                        s = NULL;
                     }
@@ -1201,6 +1202,7 @@ edje_object_part_text_escaped_set(Evas_Object *obj, const char *part, const char
              
              if (*p == '&')
                {
+                  if (!s) s = esc_start; /* This would happen when there is & that isn't escaped */
                   esc_start = p;
                   esc_end = NULL;
                   eina_strbuf_append_length(sbuf, s, p - s);