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)
This commit is contained in:
Rayyan Ansari 2024-11-27 13:15:18 +00:00
parent 730b488fe3
commit cba838dd52
No known key found for this signature in database
GPG Key ID: 46A8D18E5BC49D84
1 changed files with 1 additions and 0 deletions

View File

@ -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];