From cba838dd52a8d163c59e312d75f451a04cea9b48 Mon Sep 17 00:00:00 2001 From: Rayyan Ansari Date: Wed, 27 Nov 2024 13:15:18 +0000 Subject: [PATCH] TitleManager: fix handling of title string Truncate the title at the first occurrence of \0, as title strings should be null-terminated. Fixes #2219 (Weird characters on DSi Title Manager on melonDS 1.0RC) --- src/frontend/qt_sdl/TitleManagerDialog.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/frontend/qt_sdl/TitleManagerDialog.cpp b/src/frontend/qt_sdl/TitleManagerDialog.cpp index 30f29d24..fbff261c 100644 --- a/src/frontend/qt_sdl/TitleManagerDialog.cpp +++ b/src/frontend/qt_sdl/TitleManagerDialog.cpp @@ -119,6 +119,7 @@ void TitleManagerDialog::createTitleItem(u32 category, u32 titleid) // TODO: make it possible to select other languages? QString title = QString::fromUtf16(banner.EnglishTitle, 128); + title = title.left(title.indexOf('\0')); title.replace("\n", " ยท "); char gamecode[5];