Skip to content

Commit

Permalink
TitleManager: fix handling of title string
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
RayyanAnsari committed Nov 27, 2024
1 parent 730b488 commit cba838d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/frontend/qt_sdl/TitleManagerDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down

0 comments on commit cba838d

Please sign in to comment.