Evas textblock: started using the new eina_unicode_strndup.
authorTom Hacohen <tom@stosb.com>
Tue, 8 Feb 2011 13:44:41 +0000 (13:44 +0000)
committerTom Hacohen <tom@stosb.com>
Tue, 8 Feb 2011 13:44:41 +0000 (13:44 +0000)
SVN revision: 56808

legacy/evas/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;
           }
      }