mirror of
https://github.com/libretro/RetroArch
synced 2025-02-20 06:40:18 +00:00
Replace a VLA with char[MAXPATHLEN].
This commit is contained in:
parent
efe3f943d5
commit
5e14b302bc
4
file.c
4
file.c
@ -947,8 +947,8 @@ bool path_file_exists(const char *path)
|
||||
|
||||
void fill_pathname(char *out_path, const char *in_path, const char *replace, size_t size)
|
||||
{
|
||||
char tmp_path[strlen(in_path) + 1];
|
||||
strlcpy(tmp_path, in_path, sizeof(tmp_path));
|
||||
char tmp_path[MAXPATHLEN];
|
||||
assert(strlcpy(tmp_path, in_path, sizeof(tmp_path)) < sizeof(tmp_path));
|
||||
char *tok = strrchr(tmp_path, '.');
|
||||
if (tok != NULL)
|
||||
*tok = '\0';
|
||||
|
Loading…
x
Reference in New Issue
Block a user