diff --git a/source/game/nds.c b/source/game/nds.c index 78cddc4..2c0c30b 100644 --- a/source/game/nds.c +++ b/source/game/nds.c @@ -49,7 +49,7 @@ u32 LoadTwlMetaData(const char* path, TwlHeader* hdr, TwlIconData* icon) { u32 GetTwlTitle(char* desc, const TwlIconData* twl_icon) { const u16* title = twl_icon->title_eng; // english title memset(desc, 0, TWLICON_SIZE_DESC + 1); - for (u32 i = 0; i < TWLICON_SIZE_DESC; i++) desc[i] = title[i]; + for (u32 i = 0; i < TWLICON_SIZE_DESC; i++) desc[i] = (title[i] >= 0x80) ? ' ' : title[i]; return 0; } diff --git a/source/game/smdh.c b/source/game/smdh.c index ce133dc..89ac81b 100644 --- a/source/game/smdh.c +++ b/source/game/smdh.c @@ -1,6 +1,6 @@ #include "smdh.h" -#define SMDH_STRING(str, src, len) for (u32 i = 0; i < len; i++) str[i] = src[i] +#define SMDH_STRING(str, src, len) for (u32 i = 0; i < len; i++) str[i] = (src[i] >= 0x80) ? ' ' : src[i] // shamelessly stolen from bch2obj.py / 3ds_hb_menu :) #define SMDH_LUT 0, 1, 8, 9, 2, 3, 10, 11, 16, 17, 24, 25, 18, 19, 26, 27, \ 4, 5, 12, 13, 6, 7, 14, 15, 20, 21, 28, 29, 22, 23, 30, 31, \ diff --git a/source/virtual/vgame.c b/source/virtual/vgame.c index 97d875e..3eaef36 100644 --- a/source/virtual/vgame.c +++ b/source/virtual/vgame.c @@ -744,7 +744,7 @@ bool GetVGameLv3Filename(char* name, const VirtualFile* vfile, u32 n_chars) { } memset(name, 0, n_chars); for (u32 i = 0; (i < (n_chars-1)) && (i < name_len); i++) - name[i] = wname[i]; // poor mans UTF-16 -> UTF-8 + name[i] = wname[i]; // poor mans UTF-16 -> UTF-8 (doesn't work proper for special chars) return true; }