diff --git a/src/SFML/Graphics/Font.cpp b/src/SFML/Graphics/Font.cpp index 4b49e7be6..59ae60dd6 100644 --- a/src/SFML/Graphics/Font.cpp +++ b/src/SFML/Graphics/Font.cpp @@ -624,7 +624,7 @@ IntRect Font::findGlyphRect(Page& page, unsigned int width, unsigned int height) if (!row) { int rowHeight = height + height / 10; - while (page.nextRow + rowHeight >= page.texture.getSize().y) + while ((page.nextRow + rowHeight >= page.texture.getSize().y) || (width >= page.texture.getSize().x)) { // Not enough space: resize the texture if possible unsigned int textureWidth = page.texture.getSize().x;