From: handa Date: Wed, 21 Mar 2012 06:41:01 +0000 (+0000) Subject: (fc_decode_prop): Fix for the case of too large VAL. X-Git-Tag: REL-1-6-4~3 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=86901159bdefc3f4cf32a8b3894bfb8b78242821;p=m17n%2Fm17n-lib.git (fc_decode_prop): Fix for the case of too large VAL. --- diff --git a/src/font-ft.c b/src/font-ft.c index 771ef56..1a993c1 100644 --- a/src/font-ft.c +++ b/src/font-ft.c @@ -371,11 +371,12 @@ fc_decode_prop (int val, FC_vs_M17N_font_prop *table, int size) break; i++; } - else + else if (val > table[i].fc_value) { - for (; i < size; i++) - if (val <= table[i].fc_value) + for (i++; i < size; i++) + if (val < table[i].fc_value) break; + i--; } return table[i].sym; }