aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraliaspider2015-11-10 18:51:55 +0100
committeraliaspider2015-11-10 18:51:55 +0100
commitb7813d377622568b90ae966ff36a7c7a01a3fede (patch)
tree86e5ba977b275e78c1de34334eec689d2bf32388
parent590768711e010a976c4344e2e185a0025857d17a (diff)
downloadsnesemu-b7813d377622568b90ae966ff36a7c7a01a3fede.tar.gz
snesemu-b7813d377622568b90ae966ff36a7c7a01a3fede.tar.bz2
snesemu-b7813d377622568b90ae966ff36a7c7a01a3fede.zip
align to 4 bytes.
-rw-r--r--source/apu_blargg.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/apu_blargg.c b/source/apu_blargg.c
index 0a1d025..f7cdbe1 100644
--- a/source/apu_blargg.c
+++ b/source/apu_blargg.c
@@ -3616,6 +3616,7 @@ void S9xAPUSaveState (uint8_t *block)
spc_copy_state(&ptr, from_apu_to_state);
+ ptr = (uint8_t*)(((uintptr_t)ptr + 0x3)& ~0x3);
SET_LE32(ptr, reference_time);
ptr += sizeof(int32_t);
SET_LE32(ptr, spc_remainder);
@@ -3635,6 +3636,7 @@ void S9xAPULoadState (uint8_t *block)
spc_copy_state(&ptr, to_apu_from_state);
+ ptr = (uint8_t*)(((uintptr_t)ptr + 0x3)& ~0x3);
reference_time = GET_LE32(ptr);
ptr += sizeof(int32_t);
spc_remainder = GET_LE32(ptr);