From b302e4dbbbe9820f84ed667e3265b29a26542223 Mon Sep 17 00:00:00 2001 From: Ethan Lee Date: Wed, 15 Jul 2020 12:09:24 -0400 Subject: [PATCH] Valgrind warning fix --- desktop_version/src/Graphics.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/desktop_version/src/Graphics.cpp b/desktop_version/src/Graphics.cpp index 2acb2ae9..25f1b1ae 100644 --- a/desktop_version/src/Graphics.cpp +++ b/desktop_version/src/Graphics.cpp @@ -1339,7 +1339,8 @@ void Graphics::drawmenu( int cr, int cg, int cb, bool levelmenu /*= false*/ ) { // Uppercase the text // FIXME: This isn't UTF-8 aware! - for (size_t ii = 0; ii < SDL_arraysize(tempstring); ii++) + size_t templen = SDL_strlen(tempstring); + for (size_t ii = 0; ii < templen; ii++) { tempstring[ii] = SDL_toupper(tempstring[ii]); }