summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorZach Hilman <zachhilman@gmail.com>2019-09-22 05:00:19 +0200
committerZach Hilman <zachhilman@gmail.com>2019-10-13 19:46:27 +0200
commit36d829c27bf3cfb32935624e736547467ac2f423 (patch)
treed42c46cc9ec679d224f8c2f004855ec5523cca20 /src/core
parentpl_u: Remove excess static qualifier (diff)
downloadyuzu-36d829c27bf3cfb32935624e736547467ac2f423.tar
yuzu-36d829c27bf3cfb32935624e736547467ac2f423.tar.gz
yuzu-36d829c27bf3cfb32935624e736547467ac2f423.tar.bz2
yuzu-36d829c27bf3cfb32935624e736547467ac2f423.tar.lz
yuzu-36d829c27bf3cfb32935624e736547467ac2f423.tar.xz
yuzu-36d829c27bf3cfb32935624e736547467ac2f423.tar.zst
yuzu-36d829c27bf3cfb32935624e736547467ac2f423.zip
Diffstat (limited to 'src/core')
-rw-r--r--src/core/file_sys/system_archive/shared_font.cpp11
-rw-r--r--src/core/hle/service/ns/pl_u.h1
2 files changed, 8 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
diff --git a/src/core/hle/service/ns/pl_u.h b/src/core/hle/service/ns/pl_u.h
index 1063f4204..a8aa358a2 100644
--- a/src/core/hle/service/ns/pl_u.h
+++ b/src/core/hle/service/ns/pl_u.h
@@ -5,6 +5,7 @@
#pragma once
#include <memory>
+#include "core/hle/kernel/physical_memory.h"
#include "core/hle/service/service.h"
namespace Service {