diff options
author | Nebuleon Fumika | 2013-02-08 05:50:22 -0500 |
---|---|---|
committer | Nebuleon Fumika | 2013-02-08 05:50:22 -0500 |
commit | 927d456306672110870eb3386742c1c1ef8eb4f6 (patch) | |
tree | 509da9ac1727570b02572068aefb9cdf102ad75b /source/srtc.cpp | |
parent | 433749b6ef1e2b070755c3bb7fc0d81b5ecaa7b1 (diff) | |
parent | d4fcf2697c9a45594e3ee0b8bf82e480ddd0b69b (diff) | |
download | snesemu-927d456306672110870eb3386742c1c1ef8eb4f6.tar.gz snesemu-927d456306672110870eb3386742c1c1ef8eb4f6.tar.bz2 snesemu-927d456306672110870eb3386742c1c1ef8eb4f6.zip |
Merge branch 'master' into 8bitsound
Conflicts:
source/nds/entry.cpp
Diffstat (limited to 'source/srtc.cpp')
-rw-r--r-- | source/srtc.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/source/srtc.cpp b/source/srtc.cpp index 48add97..0e6f30e 100644 --- a/source/srtc.cpp +++ b/source/srtc.cpp @@ -525,12 +525,14 @@ void S9xSRTCPreSaveState () SRAM [s + 0] = rtc.needs_init; SRAM [s + 1] = rtc.count_enable; - memmove (&SRAM [s + 2], rtc.data, MAX_RTC_INDEX + 1); + // memmove converted: Different mallocs [Neb] + memcpy (&SRAM [s + 2], rtc.data, MAX_RTC_INDEX + 1); SRAM [s + 3 + MAX_RTC_INDEX] = rtc.index; SRAM [s + 4 + MAX_RTC_INDEX] = rtc.mode; #ifdef LSB_FIRST - memmove (&SRAM [s + 5 + MAX_RTC_INDEX], &rtc.system_timestamp, 8); + // memmove converted: Different mallocs [Neb] + memcpy (&SRAM [s + 5 + MAX_RTC_INDEX], &rtc.system_timestamp, 8); #else SRAM [s + 5 + MAX_RTC_INDEX] = (uint8) (rtc.system_timestamp >> 0); SRAM [s + 6 + MAX_RTC_INDEX] = (uint8) (rtc.system_timestamp >> 8); @@ -555,12 +557,14 @@ void S9xSRTCPostLoadState () rtc.needs_init = SRAM [s + 0]; rtc.count_enable = SRAM [s + 1]; - memmove (rtc.data, &SRAM [s + 2], MAX_RTC_INDEX + 1); + // memmove converted: Different mallocs [Neb] + memcpy (rtc.data, &SRAM [s + 2], MAX_RTC_INDEX + 1); rtc.index = SRAM [s + 3 + MAX_RTC_INDEX]; rtc.mode = SRAM [s + 4 + MAX_RTC_INDEX]; #ifdef LSB_FIRST - memmove (&rtc.system_timestamp, &SRAM [s + 5 + MAX_RTC_INDEX], 8); + // memmove converted: Different mallocs [Neb] + memcpy (&rtc.system_timestamp, &SRAM [s + 5 + MAX_RTC_INDEX], 8); #else rtc.system_timestamp |= (SRAM [s + 5 + MAX_RTC_INDEX] << 0); rtc.system_timestamp |= (SRAM [s + 6 + MAX_RTC_INDEX] << 8); |