From 86901159bdefc3f4cf32a8b3894bfb8b78242821 Mon Sep 17 00:00:00 2001 From: handa Date: Wed, 21 Mar 2012 06:41:01 +0000 Subject: [PATCH] (fc_decode_prop): Fix for the case of too large VAL. --- src/font-ft.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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; } -- 1.7.10.4