mirror of
https://github.com/love2d/love.git
synced 2026-08-16 00:02:12 +02:00
Updated the error message when invalid UTF-8 strings are used in love.graphics.print and friends to mention UTF-8.
This commit is contained in:
@@ -367,7 +367,7 @@ void Font::print(const std::string &text, float x, float y, float extra_spacing,
|
||||
}
|
||||
catch (utf8::exception &e)
|
||||
{
|
||||
throw love::Exception("Decoding error: %s", e.what());
|
||||
throw love::Exception("UTF-8 decoding error: %s", e.what());
|
||||
}
|
||||
|
||||
if (vertexcount <= 0 || glyphinfolist.size() == 0)
|
||||
@@ -429,7 +429,7 @@ int Font::getWidth(const std::string &str)
|
||||
}
|
||||
catch(utf8::exception &e)
|
||||
{
|
||||
throw love::Exception("Decoding error: %s", e.what());
|
||||
throw love::Exception("UTF-8 decoding error: %s", e.what());
|
||||
}
|
||||
|
||||
if (width > max_width)
|
||||
|
||||
Reference in New Issue
Block a user