summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/vi/vi.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hle/service/vi/vi.cpp')
-rw-r--r--src/core/hle/service/vi/vi.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/hle/service/vi/vi.cpp b/src/core/hle/service/vi/vi.cpp
index cae2c4466..57ad4c59c 100644
--- a/src/core/hle/service/vi/vi.cpp
+++ b/src/core/hle/service/vi/vi.cpp
@@ -47,8 +47,9 @@ public:
}
std::vector<u8> ReadBlock(size_t length) {
- std::vector<u8> data(length);
- std::memcpy(data.data(), buffer.data() + read_index, length);
+ const u8* const begin = buffer.data() + read_index;
+ const u8* const end = begin + length;
+ std::vector<u8> data(begin, end);
read_index += length;
read_index = Common::AlignUp(read_index, 4);
return data;