mirror of
https://github.com/libretro/RetroArch
synced 2025-04-09 21:45:45 +00:00
Fix regression in patching when zlib CRC32 is used.
This commit is contained in:
parent
32f45b2f27
commit
40300e502b
3
hash.h
3
hash.h
@ -39,7 +39,8 @@ static inline uint32_t crc32_calculate(const uint8_t *data, size_t length)
|
|||||||
|
|
||||||
static inline uint32_t crc32_adjust(uint32_t crc, uint8_t data)
|
static inline uint32_t crc32_adjust(uint32_t crc, uint8_t data)
|
||||||
{
|
{
|
||||||
return crc32(crc, &data, 1);
|
// zlib and nall have different assumptions on "sign" for this function.
|
||||||
|
return ~crc32(~crc, &data, 1);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
uint32_t crc32_calculate(const uint8_t *data, size_t length);
|
uint32_t crc32_calculate(const uint8_t *data, size_t length);
|
||||||
|
@ -2696,10 +2696,11 @@ int rarch_main_init(int argc, char *argv[])
|
|||||||
g_extern.use_sram = true;
|
g_extern.use_sram = true;
|
||||||
bool allow_cheats = true;
|
bool allow_cheats = true;
|
||||||
|
|
||||||
|
fill_pathnames();
|
||||||
|
|
||||||
if (!init_rom_file(g_extern.game_type))
|
if (!init_rom_file(g_extern.game_type))
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
fill_pathnames();
|
|
||||||
set_savestate_auto_index();
|
set_savestate_auto_index();
|
||||||
|
|
||||||
init_system_av_info();
|
init_system_av_info();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user