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:
|
case FcTypeInteger:
|
||||||
v.type = FcTypeDouble;
|
v.type = FcTypeDouble;
|
||||||
v.u.d = (double) v.u.i;
|
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;
|
break;
|
||||||
case FcTypeVoid:
|
case FcTypeVoid:
|
||||||
if (u.type == FcTypeMatrix)
|
if (u.type == FcTypeMatrix)
|
||||||
|
@ -964,13 +971,6 @@ FcConfigPromote (FcValue v, FcValue u, FcValuePromotionBuffer *buf)
|
||||||
v.type = FcTypeLangSet;
|
v.type = FcTypeLangSet;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case FcTypeDouble:
|
|
||||||
if (u.type == FcTypeRange && buf)
|
|
||||||
{
|
|
||||||
v.u.r = FcRangePromote (v.u.d, buf);
|
|
||||||
v.type = FcTypeRange;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue