Fix 128x256 default.png crashing the game

This commit is contained in:
UnknownShadow200 2020-04-20 18:37:03 +10:00
parent 11211e9526
commit feff50b4c4

View File

@ -109,6 +109,9 @@ static void CalculateTextWidths(void) {
BitmapCol* row;
int i, x, y, xx, tileX, tileY;
/* If 128x256 font bitmap is supplied, treat it as 128x128 */
height = min(width, height);
for (y = 0; y < height; y++) {
tileY = y / tileSize;
row = Bitmap_GetRow(&fontBitmap, y);