Fixup: Promote ints to ranges when appropriate
Pointed out by Akira Tagoh.
diff --git a/src/fccfg.c b/src/fccfg.c
index 13bd0ff..f86f680 100644
--- a/src/fccfg.c
+++ b/src/fccfg.c
@@ -939,6 +939,13 @@
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 @@
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;
}