diff options
author | Zach Hilman <zachhilman@gmail.com> | 2019-09-22 05:00:19 +0200 |
---|---|---|
committer | Zach Hilman <zachhilman@gmail.com> | 2019-09-22 05:00:22 +0200 |
commit | 2a4730cbee231d91577d8af439f3e30a149c5247 (patch) | |
tree | 690b00a96ada3631d6ae4dba106dd493d6478eed /src/core/file_sys | |
parent | pl_u: Remove excess static qualifier (diff) | |
download | yuzu-2a4730cbee231d91577d8af439f3e30a149c5247.tar yuzu-2a4730cbee231d91577d8af439f3e30a149c5247.tar.gz yuzu-2a4730cbee231d91577d8af439f3e30a149c5247.tar.bz2 yuzu-2a4730cbee231d91577d8af439f3e30a149c5247.tar.lz yuzu-2a4730cbee231d91577d8af439f3e30a149c5247.tar.xz yuzu-2a4730cbee231d91577d8af439f3e30a149c5247.tar.zst yuzu-2a4730cbee231d91577d8af439f3e30a149c5247.zip |
Diffstat (limited to 'src/core/file_sys')
-rw-r--r-- | src/core/file_sys/system_archive/shared_font.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/core/file_sys/system_archive/shared_font.cpp b/src/core/file_sys/system_archive/shared_font.cpp index 8613a39b7..5bb596824 100644 --- a/src/core/file_sys/system_archive/shared_font.cpp +++ b/src/core/file_sys/system_archive/shared_font.cpp @@ -18,13 +18,16 @@ namespace { template <std::size_t Size> VirtualFile PackBFTTF(const std::array<u8, Size>& data, const std::string& name) { - std::vector<u32> vec(Size / sizeof(u32)); - std::memcpy(vec.data(), data.data(), vec.size() * sizeof(u32)); + std::vector<u8> vec(Size); + std::memcpy(vec.data(), data.data(), vec.size()); - std::vector<u8> bfttf(Size + sizeof(u64)); + Kernel::PhysicalMemory bfttf(Size + sizeof(u64)); Service::NS::EncryptSharedFont(vec, bfttf); - return std::make_shared<VectorVfsFile>(std::move(bfttf), name); + + std::vector<u8> bfttf_vec(Size + sizeof(u64)); + std::memcpy(bfttf_vec.data(), bfttf.data(), bfttf_vec.size()); + return std::make_shared<VectorVfsFile>(std::move(bfttf_vec), name); } } // Anonymous namespace |