fix binary search for "bitmap font drawing chars" to actually work all
authorraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Fri, 6 Jul 2012 09:53:58 +0000 (09:53 +0000)
committerraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Fri, 6 Jul 2012 09:53:58 +0000 (09:53 +0000)
the time! :) (this went in since last release so no chlog)

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@73405 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/engines/common/evas_font_main.c

index e51a935..1977337 100644 (file)
@@ -633,14 +633,14 @@ evas_common_get_char_index(RGBA_Font_Int* fi, Eina_Unicode gl)
              if (gl > v)
                {
                   min = i;
-                  if ((max - min) == 2) i = max;
+                  if ((max - min) == 1) i = max;
                   else i = (min + max) / 2;
                }
              // if glyph below out position
              else if (gl < v)
                {
                   max = i;
-                  if ((max - min) == 2) i = min;
+                  if ((max - min) == 1) i = min;
                   else i = (min + max) / 2;
                }
           }