mirror of
https://github.com/libretro/RetroArch
synced 2025-02-06 18:40:49 +00:00
(file_ops.c) read_generic_file - set len to -1 in case of an error
This commit is contained in:
parent
82c1ebf8d5
commit
969152b902
@ -134,6 +134,8 @@ error:
|
||||
fclose(file);
|
||||
if (rom_buf)
|
||||
free(rom_buf);
|
||||
if (len)
|
||||
*len = -1;
|
||||
*buf = NULL;
|
||||
return false;
|
||||
}
|
||||
@ -238,6 +240,5 @@ int read_file(const char *path, void **buf, ssize_t *length)
|
||||
#endif
|
||||
if (read_generic_file(path, buf, length))
|
||||
return 1;
|
||||
*length = -1;
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user