From b221999e1ee5d7a299b162733a958cdd53b8683a Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Mon, 17 Aug 2020 00:50:56 +0200 Subject: [PATCH] GRAPHICS: Allocate more memory on generating scaled Mac fonts --- graphics/fonts/macfont.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/graphics/fonts/macfont.cpp b/graphics/fonts/macfont.cpp index 32817d064e7..7677a460bd7 100644 --- a/graphics/fonts/macfont.cpp +++ b/graphics/fonts/macfont.cpp @@ -420,7 +420,7 @@ MacFONTFont *MacFONTFont::scaleFont(const MacFONTFont *src, int newSize, bool bo Graphics::Surface srcSurf, tmpSurf; srcSurf.create(MAX(src->getFontSize() * 2, newSize * 2), MAX(src->getFontSize() * 2, newSize * 2), PixelFormat::createFormatCLUT8()); - int dstGraySize = newSize * 2 * newSize; + int dstGraySize = newSize * 20 * newSize; int *dstGray = (int *)malloc(dstGraySize * sizeof(int)); tmpSurf.create(MAX(src->getFontSize() * 2, newSize * 2), MAX(src->getFontSize() * 2 + 2, newSize * 2 + 2),