mirror of
https://github.com/love2d/love.git
synced 2026-08-15 15:51:12 +02:00
Prevent out-of-bounds access in Text:add when an empty string is added (fixes #1372)
This commit is contained in:
@@ -112,6 +112,9 @@ void Text::addTextData(const TextData &t)
|
||||
else
|
||||
new_commands = font->generateVerticesFormatted(t.codepoints, constantcolor, t.wrap, t.align, vertices, &text_info);
|
||||
|
||||
if (vertices.empty())
|
||||
return;
|
||||
|
||||
if (t.use_matrix)
|
||||
t.matrix.transformXY(&vertices[0], &vertices[0], (int) vertices.size());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user