Don't try to open IPS/UPS/BPS patches if they don't exist

This commit is contained in:
twinaphex 2016-02-11 18:57:27 +01:00
parent bd008748da
commit c1fbccfc06

View File

@ -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)