fix segmentation faulf on PS3 when Load State

This commit is contained in:
unknown 2020-11-07 01:42:58 +01:00
parent f37d38bcd4
commit 26559d635e
1 changed files with 7 additions and 0 deletions

View File

@ -860,7 +860,11 @@ static void task_load_handler(retro_task_t *task)
{
if (state->autoload)
{
#ifdef __CELLOS_LV2__
char *msg = (char*)malloc(8192 * sizeof(char));
#else
char msg[8192];
#endif
msg[0] = '\0';
@ -871,6 +875,9 @@ static void task_load_handler(retro_task_t *task)
state->path,
msg_hash_to_str(MSG_FAILED));
task_set_error(task, strdup(msg));
#ifdef __CELLOS_LV2__
free(msg);
#endif
}
else
task_set_error(task, strdup(msg_hash_to_str(MSG_FAILED_TO_LOAD_STATE)));