love.graphics.printf errors if the wrap limit parameter is negative (resolves issue #706)

This commit is contained in:
Alex Szpakowski
2013-08-18 13:17:53 -03:00
parent 96a668ecf3
commit acfce1bf47
+3
View File
@@ -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;