mirror of
https://github.com/libretro/RetroArch
synced 2025-02-06 18:40:49 +00:00
additional error tracking after file reads, when closing the stream
This commit is contained in:
parent
a8fea21f11
commit
24cbff147b
@ -133,7 +133,9 @@ static bool read_generic_file(const char *path, void **buf, ssize_t *len)
|
||||
/* Allow for easy reading of strings to be safe.
|
||||
* Will only work with sane character formatting (Unix). */
|
||||
((char*)rom_buf)[_len] = '\0';
|
||||
fclose(file);
|
||||
|
||||
if (fclose(file) != 0)
|
||||
RARCH_WARN("Failed to close file stream.\n");
|
||||
|
||||
if (len)
|
||||
*len = ret;
|
||||
|
Loading…
x
Reference in New Issue
Block a user