mirror of
https://github.com/libretro/RetroArch
synced 2025-03-01 16:13:40 +00:00
(Android) Build fix
This commit is contained in:
parent
935b112a11
commit
47889ff755
@ -158,15 +158,16 @@ static size_t zlib_file_size(void *handle)
|
||||
|
||||
static void *zlib_file_open(const char *path)
|
||||
{
|
||||
ssize_t ret;
|
||||
size_t ret = -1;
|
||||
bool read_from_file = false;
|
||||
zlib_file_data_t *data = (zlib_file_data_t*)calloc(1, sizeof(*data));
|
||||
|
||||
if (!data)
|
||||
return NULL;
|
||||
|
||||
ret = read_file(path, &data->data);
|
||||
read_from_file = read_file(path, &data->data, &ret);
|
||||
|
||||
if (ret < 0)
|
||||
if (!read_from_file || ret < 0)
|
||||
{
|
||||
RARCH_ERR("Failed to open archive: %s.\n",
|
||||
path);
|
||||
|
@ -116,10 +116,7 @@ static bool read_generic_file(const char *path, void **buf, size_t *len)
|
||||
rom_buf = malloc(_len + 1);
|
||||
|
||||
if (!rom_buf)
|
||||
{
|
||||
RARCH_ERR("Couldn't allocate memory.\n");
|
||||
goto error;
|
||||
}
|
||||
|
||||
if ((ret = fread(rom_buf, 1, _len, file)) < _len)
|
||||
RARCH_WARN("Didn't read whole file.\n");
|
||||
|
Loading…
x
Reference in New Issue
Block a user