mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-22 07:21:06 +01:00
fixed a bug with fractional part in a negative value
This commit is contained in:
1 parent
620d1ef588
commit
a5fa843c74
1 file changed
+5
-1
@@ -146,7 +146,11 @@ struct DictOpSet : OpSet<Number>
|
||||
case END:
|
||||
value = (double)(neg? -int_part: int_part);
|
||||
if (frac_count > 0)
|
||||
value += (frac_part / pow (10.0, (double)frac_count));
|
||||
{
|
||||
double frac = (frac_part / pow (10.0, (double)frac_count));
|
||||
if (neg) frac = -frac;
|
||||
value += frac;
|
||||
}
|
||||
if (unlikely (exp_overflow))
|
||||
{
|
||||
if (value == 0.0)
|
||||
|
||||
Reference in new issue
Block a user