Don't try to open IPS/UPS/BPS patches if they don't exist
This commit is contained in:
parent
bd008748da
commit
c1fbccfc06
3
patch.c
3
patch.c
|
@ -26,6 +26,7 @@
|
|||
#include <file/file_path.h>
|
||||
#include <file/file_archive.h>
|
||||
#include <retro_file.h>
|
||||
#include <retro_stat.h>
|
||||
#include <string/stdstring.h>
|
||||
|
||||
#include "patch.h"
|
||||
|
@ -499,6 +500,8 @@ static bool apply_patch_content(uint8_t **buf,
|
|||
ssize_t ret_size = *size;
|
||||
uint8_t *ret_buf = *buf;
|
||||
|
||||
if (!path_is_valid(patch_path))
|
||||
return false;
|
||||
if (!retro_read_file(patch_path, &patch_data, &patch_size))
|
||||
return false;
|
||||
if (patch_size < 0)
|
||||
|
|
Loading…
Reference in New Issue