Skip to content

Commit 6877d46

Browse files
committed
Zero-initialize client_dir in FS_FindBaseDir()
Otherwise, we'll set basedir/libdir to garbage if nothing was found.
1 parent 1851f05 commit 6877d46

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/common/files.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3954,7 +3954,7 @@ static void FS_FindBaseDir(void)
39543954

39553955
if (detect_base_dir) {
39563956
// find Steam installation dir first
3957-
char client_dir[MAX_OSPATH];
3957+
char client_dir[MAX_OSPATH] = { 0 };
39583958

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

0 commit comments

Comments
 (0)