protext against <0 table lookups. yes eina_unicode can define
authorCarsten Haitzler <raster@rasterman.com>
Sat, 4 Jun 2011 03:31:29 +0000 (03:31 +0000)
committerCarsten Haitzler <raster@rasterman.com>
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!

SVN revision: 59947

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