From 2e78eab92fada2cf2954b5a38774fbd504656e89 Mon Sep 17 00:00:00 2001 From: Misa Date: Fri, 25 Sep 2020 12:52:34 -0700 Subject: [PATCH] Clear font_positions if there is no font.txt This fixes a bug where font_positions wouldn't get cleared after exiting a custom level that had a font.txt if it didn't exist in the default graphics, leading to messed-up-looking font rendering. This bug was originally discovered by Ally. --- desktop_version/src/Graphics.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/desktop_version/src/Graphics.cpp b/desktop_version/src/Graphics.cpp index 1c4d3b67..4eac7278 100644 --- a/desktop_version/src/Graphics.cpp +++ b/desktop_version/src/Graphics.cpp @@ -267,6 +267,8 @@ void Graphics::Makebfont() ++pos; } FILESYSTEM_freeMemory(&charmap); + } else { + font_positions.clear(); } }