summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/ssl_c.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2016-05-30 03:57:07 +0200
committerbunnei <bunneidev@gmail.com>2016-05-30 03:57:07 +0200
commitab4b27f0f5760c7f378f29756d3ce631bafca1b2 (patch)
tree6340ca66710e9603db24c051da0b8173b796d3c6 /src/core/hle/service/ssl_c.cpp
parentMerge pull request #1756 from wwylele/config-cleanup (diff)
parentMemory: Handle RasterizerCachedMemory and RasterizerCachedSpecial page types in the memory block manipulation functions. (diff)
downloadyuzu-ab4b27f0f5760c7f378f29756d3ce631bafca1b2.tar
yuzu-ab4b27f0f5760c7f378f29756d3ce631bafca1b2.tar.gz
yuzu-ab4b27f0f5760c7f378f29756d3ce631bafca1b2.tar.bz2
yuzu-ab4b27f0f5760c7f378f29756d3ce631bafca1b2.tar.lz
yuzu-ab4b27f0f5760c7f378f29756d3ce631bafca1b2.tar.xz
yuzu-ab4b27f0f5760c7f378f29756d3ce631bafca1b2.tar.zst
yuzu-ab4b27f0f5760c7f378f29756d3ce631bafca1b2.zip
Diffstat (limited to 'src/core/hle/service/ssl_c.cpp')
-rw-r--r--src/core/hle/service/ssl_c.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/core/hle/service/ssl_c.cpp b/src/core/hle/service/ssl_c.cpp
index 14a4e98ec..a8aff1abf 100644
--- a/src/core/hle/service/ssl_c.cpp
+++ b/src/core/hle/service/ssl_c.cpp
@@ -31,7 +31,6 @@ static void GenerateRandomData(Service::Interface* self) {
u32 size = cmd_buff[1];
VAddr address = cmd_buff[3];
- u8* output_buff = Memory::GetPointer(address);
// Fill the output buffer with random data.
u32 data = 0;
@@ -44,13 +43,13 @@ static void GenerateRandomData(Service::Interface* self) {
if (size > 4) {
// Use up the entire 4 bytes of the random data for as long as possible
- *(u32*)(output_buff + i) = data;
+ Memory::Write32(address + i, data);
i += 4;
} else if (size == 2) {
- *(u16*)(output_buff + i) = (u16)(data & 0xffff);
+ Memory::Write16(address + i, static_cast<u16>(data & 0xffff));
i += 2;
} else {
- *(u8*)(output_buff + i) = (u8)(data & 0xff);
+ Memory::Write8(address + i, static_cast<u8>(data & 0xff));
i++;
}
}