Skip to content

Commit

Permalink
Zero-initialize client_dir in FS_FindBaseDir()
Browse files Browse the repository at this point in the history
Otherwise, we'll set basedir/libdir to garbage if nothing was found.
  • Loading branch information
res2k committed Nov 22, 2024
1 parent 1851f05 commit 6877d46
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/common/files.c
Original file line number Diff line number Diff line change
Expand Up @@ -3954,7 +3954,7 @@ static void FS_FindBaseDir(void)

if (detect_base_dir) {
// find Steam installation dir first
char client_dir[MAX_OSPATH];
char client_dir[MAX_OSPATH] = { 0 };

if (Sys_GetInstalledGamePath(GAME_PATH_STEAM, client_dir, sizeof(client_dir))) {

Expand Down

0 comments on commit 6877d46

Please sign in to comment.