Commit 835f9bbd authored by Matthias Clasen's avatar Matthias Clasen
Browse files

Fixup: Promote ints to ranges when appropriate

Pointed out by Akira Tagoh.
parent 148ebf98
......@@ -939,6 +939,13 @@ FcConfigPromote (FcValue v, FcValue u, FcValuePromotionBuffer *buf)
case FcTypeInteger:
v.type = FcTypeDouble;
v.u.d = (double) v.u.i;
/* Fallthrough */
case FcTypeDouble:
if (u.type == FcTypeRange && buf)
{
v.u.r = FcRangePromote (v.u.d, buf);
v.type = FcTypeRange;
}
break;
case FcTypeVoid:
if (u.type == FcTypeMatrix)
......@@ -964,13 +971,6 @@ FcConfigPromote (FcValue v, FcValue u, FcValuePromotionBuffer *buf)
v.type = FcTypeLangSet;
}
break;
case FcTypeDouble:
if (u.type == FcTypeRange && buf)
{
v.u.r = FcRangePromote (v.u.d, buf);
v.type = FcTypeRange;
}
break;
default:
break;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment