From acfce1bf4797189ac2e4af2ea08fdc543df47ab5 Mon Sep 17 00:00:00 2001 From: Alex Szpakowski Date: Sun, 18 Aug 2013 13:17:53 -0300 Subject: [PATCH] love.graphics.printf errors if the wrap limit parameter is negative (resolves issue #706) --- src/modules/graphics/opengl/Graphics.cpp | 3 +++ 1 file changed, 3 insertions(+) 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;