diff options
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); |