Fix SIGFPE

This commit is contained in:
Akira TAGOH 2015-03-30 15:18:44 +09:00
parent e92c92ff22
commit 7bc07cf6c2
1 changed files with 1 additions and 1 deletions

View File

@ -204,7 +204,7 @@ FcRangeHash (const FcRange *r)
{ {
FcRange c = FcRangeCanonicalize (r); FcRange c = FcRangeCanonicalize (r);
int b = (int) (c.u.d.begin * 100); int b = (int) (c.u.d.begin * 100);
int e = (int) (c.u.d.end * 100); int e = FcDoubleCmpEQ (c.u.d.end, DBL_MAX) ? INT_MAX : (int) (c.u.d.end * 100);
return b ^ (b << 1) ^ (e << 9); return b ^ (b << 1) ^ (e << 9);
} }