Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir     : e17/libs/evas/src/lib/canvas


Modified Files:
        evas_object_textblock.c 


Log Message:
Fix missing null terminator in textblock.

Although I used 3 lines comments to state it was not required, it is
required because none of the values accounted includes the '\0'.

===================================================================
RCS file: /cvs/e/e17/libs/evas/src/lib/canvas/evas_object_textblock.c,v
retrieving revision 1.148
retrieving revision 1.149
diff -u -3 -r1.148 -r1.149
--- evas_object_textblock.c     6 Mar 2008 00:41:47 -0000       1.148
+++ evas_object_textblock.c     6 Mar 2008 01:06:58 -0000       1.149
@@ -334,10 +334,7 @@
      pos = 0;
 
    text_len = strlen(text);
-   /* ATTENTION: no + 1 is required for req_alloc as text will be
-    * inserted before the end of the string.
-    */
-   req_alloc = *strbuf_len + text_len;
+   req_alloc = *strbuf_len + text_len + 1;
    if (!_strbuf_grow_if_required(&strbuf, strbuf_alloc, req_alloc))
      return strbuf;
 



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to