Evas font-ot: Fixed mistakes that caused ilegal reads.

SVN revision: 56464
This commit is contained in:
Tom Hacohen 2011-01-30 10:37:40 +00:00
parent 63e25655e1
commit 48b3a796a5
1 changed files with 4 additions and 3 deletions

View File

@ -73,12 +73,13 @@ evas_common_font_ot_cluster_size_get(const Evas_Text_Props *props, size_t char_i
{
if (right_bound == (int) props->ot_data->len)
{
items = orig_len - props->ot_data->items[left_bound].source_cluster;
items = orig_len -
props->ot_data->items[right_bound - 1].source_cluster;
}
else
{
items = props->ot_data->items[right_bound - 1].source_cluster -
props->ot_data->items[right_bound].source_cluster;
items = props->ot_data->items[right_bound].source_cluster -
props->ot_data->items[right_bound - 1].source_cluster;
}
}
return (items > 0) ? items : 1;