RSDKModding / RSDKv4-Decompilation

A complete decompilation of Sonic 1 & Sonic 2 (2013) & Retro Engine (v4)
Other
937 stars 175 forks source link

AddressSanitizer fixes #439

Open Mefiresu opened 2 weeks ago

Mefiresu commented 2 weeks ago

- RemoveNativeObject: Fix memcpy overlap Both src and dst pointers overlap, so memcpy is unsafe here. Use memmove instead.

- PlayerSelectScreen: Fix invalid SaveRAM access in no-save mode In no-save mode, this code was trying to access saveGame->files[-1]. No-save doesn't write anything to SaveRAM in the original code, and save mode already wrote it, so all we need is to get the charID.