mirror of
https://github.com/libretro/RetroArch
synced 2025-04-16 08:43:10 +00:00
Fix bug in calculation of blocksize for savestates.
This commit is contained in:
parent
53a0d6a5b7
commit
7191465dcb
@ -315,7 +315,7 @@ static state_manager_t *state_manager_new(size_t state_size, size_t buffer_size)
|
|||||||
if (!state)
|
if (!state)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
state->blocksize = (state_size + sizeof(uint16_t) - 1) & ~sizeof(uint16_t);
|
state->blocksize = (state_size + sizeof(uint16_t) - 1) & -sizeof(uint16_t);
|
||||||
/* the compressed data is surrounded by pointers to the other side */
|
/* the compressed data is surrounded by pointers to the other side */
|
||||||
state->maxcompsize = state_manager_raw_maxsize(state_size) + sizeof(size_t) * 2;
|
state->maxcompsize = state_manager_raw_maxsize(state_size) + sizeof(size_t) * 2;
|
||||||
state->data = (uint8_t*)malloc(buffer_size);
|
state->data = (uint8_t*)malloc(buffer_size);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user