Created
December 5, 2014 23:41
-
-
Save archshift/93f134c3f6679658c22e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/core/file_sys/directory_sdmc.cpp b/src/core/file_sys/directory_sdmc.cpp | |
index 60a197c..6374e5b 100644 | |
--- a/src/core/file_sys/directory_sdmc.cpp | |
+++ b/src/core/file_sys/directory_sdmc.cpp | |
@@ -44,12 +44,7 @@ u32 Directory_SDMC::Read(const u32 count, Entry* entries) { | |
WARN_LOG(FILESYS, "File %s: size=%llu dir=%d", filename.c_str(), file.size, file.isDirectory); | |
- // TODO(Link Mauve): use a proper conversion to UTF-16. | |
- for (size_t j = 0; j < FILENAME_LENGTH; ++j) { | |
- entry.filename[j] = filename[j]; | |
- if (!filename[j]) | |
- break; | |
- } | |
+ memcpy(entry.filename, Common::UTF8ToUTF16(filename).c_str(), FILENAME_LENGTH); | |
FileUtil::SplitFilename83(filename, entry.short_name, entry.extension); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment