mirror of
https://github.com/libretro/RetroArch
synced 2025-03-01 16:13:40 +00:00
(Legacy Win32) Be more careful with retro_vfs_stat_impl
This commit is contained in:
parent
720ebc6834
commit
0919cd9746
@ -654,7 +654,12 @@ void path_basedir(char *path)
|
|||||||
**/
|
**/
|
||||||
void path_parent_dir(char *path)
|
void path_parent_dir(char *path)
|
||||||
{
|
{
|
||||||
size_t len = strlen(path);
|
size_t len = 0;
|
||||||
|
|
||||||
|
if (!path)
|
||||||
|
return;
|
||||||
|
|
||||||
|
len = strlen(path);
|
||||||
|
|
||||||
if (len && path_char_is_slash(path[len - 1]))
|
if (len && path_char_is_slash(path[len - 1]))
|
||||||
{
|
{
|
||||||
|
@ -832,7 +832,8 @@ int retro_vfs_stat_impl(const char *path, int32_t *size)
|
|||||||
path_local = utf8_to_local_string_alloc(path);
|
path_local = utf8_to_local_string_alloc(path);
|
||||||
file_info = GetFileAttributes(path_local);
|
file_info = GetFileAttributes(path_local);
|
||||||
|
|
||||||
_stat(path_local, &buf);
|
if (!string_is_empty(path_local))
|
||||||
|
_stat(path_local, &buf);
|
||||||
|
|
||||||
if (path_local)
|
if (path_local)
|
||||||
free(path_local);
|
free(path_local);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user