mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 22:20:21 +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, '.');
|
||||
stream->ext = strdup(ld ? ld + 1 : "");
|
||||
if (ld) {
|
||||
stream->ext = strdup(ld + 1);
|
||||
}
|
||||
}
|
||||
|
||||
filestream_set_size(stream);
|
||||
|
Loading…
x
Reference in New Issue
Block a user