aboutsummaryrefslogtreecommitdiff
path: root/graphics/fonts
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/fonts')
-rw-r--r--graphics/fonts/macfont.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/graphics/fonts/macfont.cpp b/graphics/fonts/macfont.cpp
index 50635fda47..e8a52d10b2 100644
--- a/graphics/fonts/macfont.cpp
+++ b/graphics/fonts/macfont.cpp
@@ -414,7 +414,8 @@ MacFONTFont *MacFONTFont::scaleFont(const MacFONTFont *src, int newSize, bool bo
}
Graphics::Surface srcSurf;
- srcSurf.create(src->getFontSize() * 2, src->getFontSize() * 2, PixelFormat::createFormatCLUT8());
+ srcSurf.create(MAX(src->getFontSize() * 2, newSize * 2), MAX(src->getFontSize() * 2, newSize * 2),
+ PixelFormat::createFormatCLUT8());
int dstGraySize = newSize * 2 * newSize;
int *dstGray = (int *)malloc(dstGraySize * sizeof(int));