protext against <0 table lookups. yes eina_unicode can define
authorraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sat, 4 Jun 2011 03:31:29 +0000 (03:31 +0000)
committerraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Sat, 4 Jun 2011 03:31:29 +0000 (03:31 +0000)
Eina_Unicode as wchart_t.. which is SIGNED.. this is the problem of
not having a fixed typedef that is known to always be the same type
with same underlying properties!

git-svn-id: http://svn.enlightenment.org/svn/e/trunk/evas@59947 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/engines/common/language/evas_language_utils.c

index 99df5ae..9c9b3e3 100644 (file)
@@ -53,7 +53,7 @@ _evas_common_language_char_script_search(Eina_Unicode unicode)
 Evas_Script_Type
 evas_common_language_char_script_get(Eina_Unicode unicode)
 {
-   if (unicode < EVAS_SCRIPT_DIRECT_TABLE_LIMIT)
+   if ((unicode >= 0) && (unicode < EVAS_SCRIPT_DIRECT_TABLE_LIMIT))
       return _evas_script_fast_table[unicode];
    else
       return _evas_common_language_char_script_search(unicode);