From: handa Date: Mon, 23 Apr 2012 00:28:46 +0000 (+0000) Subject: (get_class_def_auto): Return 0 if C is negative. X-Git-Tag: REL-0-9-13~2 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=6a7290d875b8f5b260c3287f7c63161026de2937;p=m17n%2Flibotf.git (get_class_def_auto): Return 0 if C is negative. --- diff --git a/src/otfdrive.c b/src/otfdrive.c index 97e1974..dc94ed4 100644 --- a/src/otfdrive.c +++ b/src/otfdrive.c @@ -1563,7 +1563,7 @@ static int get_class_def_auto (int c) = sizeof glyph_class_table / sizeof glyph_class_table[0]; int low, high, mid; - if (c >= glyph_class_table[table_size - 1]) + if (c < 0 || c >= glyph_class_table[table_size - 1]) return 0; low = 0; high = table_size - 1;