mirror of
https://github.com/libretro/RetroArch
synced 2025-04-01 04:20:27 +00:00
Fix strdup() call when no path is provided
This commit is contained in:
parent
9f79b99c94
commit
9f222010de
@ -330,7 +330,9 @@ RFILE *filestream_open(const char *path, unsigned mode, ssize_t len)
|
|||||||
|
|
||||||
{
|
{
|
||||||
const char *ld = (const char*)strrchr(path, '.');
|
const char *ld = (const char*)strrchr(path, '.');
|
||||||
stream->ext = strdup(ld ? ld + 1 : "");
|
if (ld) {
|
||||||
|
stream->ext = strdup(ld + 1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
filestream_set_size(stream);
|
filestream_set_size(stream);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user