Fixup: Promote ints to ranges when appropriate
Pointed out by Akira Tagoh.
This commit is contained in:
parent
148ebf98ed
commit
835f9bbdbe
14
src/fccfg.c
14
src/fccfg.c
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue