26 lines
673 B
Diff
26 lines
673 B
Diff
|
From 7bc07cf6c2a5685ab95f146f5af2b3bcd5f5864d Mon Sep 17 00:00:00 2001
|
||
|
From: Akira TAGOH <akira@tagoh.org>
|
||
|
Date: Mon, 30 Mar 2015 15:18:44 +0900
|
||
|
Subject: [PATCH] Fix SIGFPE
|
||
|
|
||
|
---
|
||
|
src/fcrange.c | 2 +-
|
||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||
|
|
||
|
diff --git a/src/fcrange.c b/src/fcrange.c
|
||
|
index 37cf067..9b1b67b 100644
|
||
|
--- a/src/fcrange.c
|
||
|
+++ b/src/fcrange.c
|
||
|
@@ -204,7 +204,7 @@ FcRangeHash (const FcRange *r)
|
||
|
{
|
||
|
FcRange c = FcRangeCanonicalize (r);
|
||
|
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);
|
||
|
}
|
||
|
--
|
||
|
2.1.0
|
||
|
|