diff --git a/src/Drawer2D.c b/src/Drawer2D.c index 511be23a5..3a04d4285 100644 --- a/src/Drawer2D.c +++ b/src/Drawer2D.c @@ -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);