Evas textblock: started using the new eina_unicode_strndup.
authortasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Tue, 8 Feb 2011 13:44:41 +0000 (13:44 +0000)
committertasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Tue, 8 Feb 2011 13:44:41 +0000 (13:44 +0000)
git-svn-id: http://svn.enlightenment.org/svn/e/trunk/evas@56808 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/canvas/evas_object_textblock.c

index 70c4f5c..bb6dd4e 100644 (file)
@@ -2733,12 +2733,7 @@ _layout_text_append(Ctxt *c, Evas_Object_Textblock_Format *fmt, Evas_Object_Text
         else
           {
              str = eina_ustrbuf_string_get(n->unicode);
-             alloc_str = eina_unicode_strdup(str + start);
-
-             if (off > 0)
-               {
-                  alloc_str[off] = 0;
-               }
+             alloc_str = eina_unicode_strndup(str + start, off);
              str = alloc_str;
           }
      }