mirror of
https://github.com/libretro/RetroArch
synced 2025-04-10 15:45:19 +00:00
Merge pull request #11527 from crystalct/master
fix segmentation fault on PS3 when Load State
This commit is contained in:
commit
bbf6fea1e4
@ -860,7 +860,11 @@ static void task_load_handler(retro_task_t *task)
|
|||||||
{
|
{
|
||||||
if (state->autoload)
|
if (state->autoload)
|
||||||
{
|
{
|
||||||
|
#ifdef __CELLOS_LV2__
|
||||||
|
char *msg = (char*)malloc(8192 * sizeof(char));
|
||||||
|
#else
|
||||||
char msg[8192];
|
char msg[8192];
|
||||||
|
#endif
|
||||||
|
|
||||||
msg[0] = '\0';
|
msg[0] = '\0';
|
||||||
|
|
||||||
@ -871,6 +875,9 @@ static void task_load_handler(retro_task_t *task)
|
|||||||
state->path,
|
state->path,
|
||||||
msg_hash_to_str(MSG_FAILED));
|
msg_hash_to_str(MSG_FAILED));
|
||||||
task_set_error(task, strdup(msg));
|
task_set_error(task, strdup(msg));
|
||||||
|
#ifdef __CELLOS_LV2__
|
||||||
|
free(msg);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
task_set_error(task, strdup(msg_hash_to_str(MSG_FAILED_TO_LOAD_STATE)));
|
task_set_error(task, strdup(msg_hash_to_str(MSG_FAILED_TO_LOAD_STATE)));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user