mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 22:20:21 +00:00
Fix edge case when file is empty
This commit is contained in:
parent
5ce0aca435
commit
92ea40d96e
@ -75,7 +75,7 @@ struct nbio_t* nbio_open(const char * filename, unsigned mode)
|
||||
if (len)
|
||||
buf = malloc(len);
|
||||
|
||||
if (!buf)
|
||||
if (len && !buf)
|
||||
goto error;
|
||||
|
||||
handle->data = buf;
|
||||
|
Loading…
x
Reference in New Issue
Block a user