summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2014-08-17 20:23:54 +0200
committerLioncash <mathew1800@gmail.com>2014-08-17 20:23:54 +0200
commitda18671166e096dc375da5c547c3be38de0493fb (patch)
tree2963df3c0857fe35238fdafc99290abf9733e959 /src
parentMerge pull request #47 from archshift/stdstring (diff)
downloadyuzu-da18671166e096dc375da5c547c3be38de0493fb.tar
yuzu-da18671166e096dc375da5c547c3be38de0493fb.tar.gz
yuzu-da18671166e096dc375da5c547c3be38de0493fb.tar.bz2
yuzu-da18671166e096dc375da5c547c3be38de0493fb.tar.lz
yuzu-da18671166e096dc375da5c547c3be38de0493fb.tar.xz
yuzu-da18671166e096dc375da5c547c3be38de0493fb.tar.zst
yuzu-da18671166e096dc375da5c547c3be38de0493fb.zip
Diffstat (limited to 'src')
-rw-r--r--src/core/mem_map_funcs.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/core/mem_map_funcs.cpp b/src/core/mem_map_funcs.cpp
index 5772cca52..ecdaa06d7 100644
--- a/src/core/mem_map_funcs.cpp
+++ b/src/core/mem_map_funcs.cpp
@@ -289,11 +289,15 @@ void Write64(const u32 addr, const u64 data) {
void WriteBlock(const u32 addr, const u8* data, const int size) {
int offset = 0;
- while (offset < (size & ~3))
- Write32(addr + offset, *(u32*)&data[offset += 4]);
+ while (offset < (size & ~3)) {
+ Write32(addr + offset, *(u32*)&data[offset]);
+ offset += 4;
+ }
- if (size & 2)
- Write16(addr + offset, *(u16*)&data[offset += 2]);
+ if (size & 2) {
+ Write16(addr + offset, *(u16*)&data[offset]);
+ offset += 2;
+ }
if (size & 1)
Write8(addr + offset, data[offset]);