GRAPHICS: Allocate more memory on generating scaled Mac fonts

This commit is contained in:
Eugene Sandulenko 2020-08-17 00:50:56 +02:00
parent 7563759f4b
commit b221999e1e

View File

@ -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),