Evas textblock: Fixed issue with *textblock_cursor_range_formats_get.
authorTom Hacohen <tom@stosb.com>
Thu, 4 Jul 2013 09:02:48 +0000 (10:02 +0100)
committerTom Hacohen <tom@stosb.com>
Thu, 4 Jul 2013 09:07:52 +0000 (10:07 +0100)
In some cases we could return extra formats that are outside of the
range. It's actually not completely fixed yet.

Thanks to clang-analyzer for detecting this.

src/lib/evas/canvas/evas_object_textblock.c

index 2b7a4be147b7e128413a85b0414695473b1bc014..58e9768a8d7c85468a284b739e702ba769fc7192 100644 (file)
@@ -8858,9 +8858,9 @@ evas_textblock_cursor_range_formats_get(const Evas_Textblock_Cursor *cur1, const
      {
         Evas_Object_Textblock_Node_Format *fnode = first;
         /* Go to the first one in the range */
-        if (first->text_node != n1)
+        if (fnode->text_node != n1)
           {
-             first = _NODE_FORMAT(EINA_INLIST_GET(first)->next);
+             fnode = _NODE_FORMAT(EINA_INLIST_GET(fnode)->next);
           }
 
         while (fnode)