summaryrefslogtreecommitdiff
path: root/src/fontpack.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/fontpack.h')
-rw-r--r--src/fontpack.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/fontpack.h b/src/fontpack.h
index 5d592822..d86de945 100644
--- a/src/fontpack.h
+++ b/src/fontpack.h
@@ -131,7 +131,8 @@ struct Impl_FontSpec {
131}; 131};
132 132
133iLocalDef int scaleType_FontSpec(enum iFontSize sizeId) { 133iLocalDef int scaleType_FontSpec(enum iFontSize sizeId) {
134 return sizeId / contentRegular_FontSize; 134 iAssert(sizeId >= 0 && sizeId < max_FontSize);
135 return sizeId < contentRegular_FontSize ? 0 : 1;
135} 136}
136 137
137/*----------------------------------------------------------------------------------------------*/ 138/*----------------------------------------------------------------------------------------------*/