summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMerryMage <MerryMage@users.noreply.github.com>2016-04-16 11:01:43 +0200
committerSubv <subv2112@gmail.com>2016-05-21 18:14:03 +0200
commit2be17a0c6e0a386b78e09dc6341182d3fe605d41 (patch)
tree402b92d4c89f1e8b25f5263c2ef58d384d6e0d58 /src
parentDebugger/Callstack: Replace Memory::GetPointer with Memory::IsValidVirtualAddress (diff)
downloadyuzu-2be17a0c6e0a386b78e09dc6341182d3fe605d41.tar
yuzu-2be17a0c6e0a386b78e09dc6341182d3fe605d41.tar.gz
yuzu-2be17a0c6e0a386b78e09dc6341182d3fe605d41.tar.bz2
yuzu-2be17a0c6e0a386b78e09dc6341182d3fe605d41.tar.lz
yuzu-2be17a0c6e0a386b78e09dc6341182d3fe605d41.tar.xz
yuzu-2be17a0c6e0a386b78e09dc6341182d3fe605d41.tar.zst
yuzu-2be17a0c6e0a386b78e09dc6341182d3fe605d41.zip
Diffstat (limited to 'src')
-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;
}