mirror of
https://github.com/libretro/RetroArch
synced 2025-04-10 15:45:19 +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)
|
if (len)
|
||||||
buf = malloc(len);
|
buf = malloc(len);
|
||||||
|
|
||||||
if (!buf)
|
if (len && !buf)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
handle->data = buf;
|
handle->data = buf;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user