diff --git a/src/modules/graphics/opengl/Graphics.cpp b/src/modules/graphics/opengl/Graphics.cpp index 0aff9f62d..97137a050 100644 --- a/src/modules/graphics/opengl/Graphics.cpp +++ b/src/modules/graphics/opengl/Graphics.cpp @@ -714,6 +714,9 @@ void Graphics::printf(const std::string &str, float x, float y, float wrap, Alig if (currentFont == 0) return; + if (wrap < 0.0f) + throw love::Exception("Horizontal wrap limit cannot be negative."); + using std::string; using std::vector;