summaryrefslogtreecommitdiffstats
path: root/src/core/file_sys
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2014-12-20 17:59:18 +0100
committerbunnei <bunneidev@gmail.com>2014-12-20 17:59:18 +0100
commit2b0d7a1d293ca28f6a9022b220720bf8b57a47e8 (patch)
tree363f962b88f1b3c8b4f9f36ad46dd3b10addde6b /src/core/file_sys
parentMerge pull request #317 from yuriks/make_unique (diff)
parentClean up some warnings (diff)
downloadyuzu-2b0d7a1d293ca28f6a9022b220720bf8b57a47e8.tar
yuzu-2b0d7a1d293ca28f6a9022b220720bf8b57a47e8.tar.gz
yuzu-2b0d7a1d293ca28f6a9022b220720bf8b57a47e8.tar.bz2
yuzu-2b0d7a1d293ca28f6a9022b220720bf8b57a47e8.tar.lz
yuzu-2b0d7a1d293ca28f6a9022b220720bf8b57a47e8.tar.xz
yuzu-2b0d7a1d293ca28f6a9022b220720bf8b57a47e8.tar.zst
yuzu-2b0d7a1d293ca28f6a9022b220720bf8b57a47e8.zip
Diffstat (limited to 'src/core/file_sys')
-rw-r--r--src/core/file_sys/archive_backend.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/core/file_sys/archive_backend.h b/src/core/file_sys/archive_backend.h
index 18c314884..d7959b2ca 100644
--- a/src/core/file_sys/archive_backend.h
+++ b/src/core/file_sys/archive_backend.h
@@ -143,7 +143,16 @@ public:
case Char:
return std::vector<u8>(string.begin(), string.end());
case Wchar:
- return std::vector<u8>(u16str.begin(), u16str.end());
+ {
+ // use two u8 for each character of u16str
+ std::vector<u8> to_return(u16str.size() * 2);
+ for (size_t i = 0; i < u16str.size(); ++i) {
+ u16 tmp_char = u16str.at(i);
+ to_return[i*2] = (tmp_char & 0xFF00) >> 8;
+ to_return[i*2 + 1] = (tmp_char & 0x00FF);
+ }
+ return to_return;
+ }
case Empty:
return {};
default: