summaryrefslogtreecommitdiffstats
path: root/src/core/file_sys/archive_backend.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2016-05-30 03:57:07 +0200
committerbunnei <bunneidev@gmail.com>2016-05-30 03:57:07 +0200
commitab4b27f0f5760c7f378f29756d3ce631bafca1b2 (patch)
tree6340ca66710e9603db24c051da0b8173b796d3c6 /src/core/file_sys/archive_backend.cpp
parentMerge pull request #1756 from wwylele/config-cleanup (diff)
parentMemory: Handle RasterizerCachedMemory and RasterizerCachedSpecial page types in the memory block manipulation functions. (diff)
downloadyuzu-ab4b27f0f5760c7f378f29756d3ce631bafca1b2.tar
yuzu-ab4b27f0f5760c7f378f29756d3ce631bafca1b2.tar.gz
yuzu-ab4b27f0f5760c7f378f29756d3ce631bafca1b2.tar.bz2
yuzu-ab4b27f0f5760c7f378f29756d3ce631bafca1b2.tar.lz
yuzu-ab4b27f0f5760c7f378f29756d3ce631bafca1b2.tar.xz
yuzu-ab4b27f0f5760c7f378f29756d3ce631bafca1b2.tar.zst
yuzu-ab4b27f0f5760c7f378f29756d3ce631bafca1b2.zip
Diffstat (limited to 'src/core/file_sys/archive_backend.cpp')
-rw-r--r--src/core/file_sys/archive_backend.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/core/file_sys/archive_backend.cpp b/src/core/file_sys/archive_backend.cpp
index 97adf0e12..cc0aa7022 100644
--- a/src/core/file_sys/archive_backend.cpp
+++ b/src/core/file_sys/archive_backend.cpp
@@ -19,22 +19,22 @@ Path::Path(LowPathType type, u32 size, u32 pointer) : type(type) {
switch (type) {
case Binary:
{
- u8* data = Memory::GetPointer(pointer);
- binary = std::vector<u8>(data, data + size);
+ binary.resize(size);
+ Memory::ReadBlock(pointer, binary.data(), binary.size());
break;
}
case Char:
{
- const char* data = reinterpret_cast<const char*>(Memory::GetPointer(pointer));
- string = std::string(data, size - 1); // Data is always null-terminated.
+ string.resize(size - 1); // Data is always null-terminated.
+ Memory::ReadBlock(pointer, &string[0], string.size());
break;
}
case Wchar:
{
- const char16_t* data = reinterpret_cast<const char16_t*>(Memory::GetPointer(pointer));
- u16str = std::u16string(data, size/2 - 1); // Data is always null-terminated.
+ u16str.resize(size / 2 - 1); // Data is always null-terminated.
+ Memory::ReadBlock(pointer, &u16str[0], u16str.size() * sizeof(char16_t));
break;
}