From df001e83b19adda1d586d6dc4125d56aba1324d6 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Thu, 19 Jul 2018 15:57:56 -0400 Subject: pl_u: Specify correct size for buffers in GetSharedFontInOrderOfPriority() This WriteBuffer overload expects its size argument to be in bytes, not elements. --- src/core/hle/service/ns/pl_u.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/core/hle/service/ns/pl_u.cpp') diff --git a/src/core/hle/service/ns/pl_u.cpp b/src/core/hle/service/ns/pl_u.cpp index d6a12ede5..9b6f400e9 100644 --- a/src/core/hle/service/ns/pl_u.cpp +++ b/src/core/hle/service/ns/pl_u.cpp @@ -132,9 +132,9 @@ void PL_U::GetSharedFontInOrderOfPriority(Kernel::HLERequestContext& ctx) { font_sizes.push_back(SHARED_FONT_REGIONS[i].size); } - ctx.WriteBuffer(font_codes.data(), font_codes.size(), 0); - ctx.WriteBuffer(font_offsets.data(), font_offsets.size(), 1); - ctx.WriteBuffer(font_sizes.data(), font_sizes.size(), 2); + ctx.WriteBuffer(font_codes.data(), font_codes.size() * sizeof(u32), 0); + ctx.WriteBuffer(font_offsets.data(), font_offsets.size() * sizeof(u32), 1); + ctx.WriteBuffer(font_sizes.data(), font_sizes.size() * sizeof(u32), 2); rb.Push(RESULT_SUCCESS); rb.Push(static_cast(LoadState::Done)); // Fonts Loaded -- cgit v1.2.3