font rendering texture check was inverted

This commit is contained in:
Noel Berry 2020-09-20 13:47:07 -07:00 committed by GitHub
parent b31bcf86c0
commit 484da29efb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -811,7 +811,7 @@ void Batch::str(const SpriteFont& font, const String& text, const Vec2& pos, Tex
// It will assume it's a 1-byte ASCII char which is incorrect // It will assume it's a 1-byte ASCII char which is incorrect
auto ch = font[text[i]]; auto ch = font[text[i]];
if (!ch.subtexture.texture || !ch.subtexture.texture->is_valid()) if (ch.subtexture.texture && ch.subtexture.texture->is_valid())
{ {
Vec2 at = offset + ch.offset; Vec2 at = offset + ch.offset;