diff options
author | aliaspider | 2014-10-31 00:56:05 +0100 |
---|---|---|
committer | aliaspider | 2014-10-31 00:56:05 +0100 |
commit | fe1e946c5aea3c52d15ce237168abab823e4a8ca (patch) | |
tree | 9cd55684eda20d8875efe13c0c7fdd2923feebf3 | |
parent | 15f51d4158d24e17ce6c4ee923525d496ffdc97e (diff) | |
download | snesemu-fe1e946c5aea3c52d15ce237168abab823e4a8ca.tar.gz snesemu-fe1e946c5aea3c52d15ce237168abab823e4a8ca.tar.bz2 snesemu-fe1e946c5aea3c52d15ce237168abab823e4a8ca.zip |
prevent loading incompatible savestates ( does only check for size ).
-rw-r--r-- | libretro.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -606,8 +606,12 @@ bool retro_serialize(void* data, size_t size) return true; } bool retro_unserialize(const void* data, size_t size) -{ +{ const uint8_t* buffer = data; + + if (size != retro_serialize_size()) + return false; + S9xReset(); uint8* IAPU_RAM_current = IAPU.RAM; |