From a66efd6102a374f7c1e34cc9feffd06b281b3ae1 Mon Sep 17 00:00:00 2001 From: Er2 Date: Sat, 6 May 2023 19:07:53 +0300 Subject: [PATCH] fix error when no -game was provided --- public/filesystem_init.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/public/filesystem_init.cpp b/public/filesystem_init.cpp index fa69ae6a..c3729707 100644 --- a/public/filesystem_init.cpp +++ b/public/filesystem_init.cpp @@ -324,15 +324,14 @@ static bool FileSystem_GetBaseDir( char *baseDir, int baseDirLen ) { #ifdef ANDROID Q_strncpy(baseDir, getenv("VALVE_GAME_PATH"), baseDirLen); - return true; #else // get relative base dir which appends to other paths // allows to run from everywhere // "hl2/portal" -> "hl2"; "hl2" -> "" - Q_strncpy( baseDir, CommandLine()->ParmValue("-game"), baseDirLen ); + Q_strncpy( baseDir, CommandLine()->ParmValue("-game", ""), baseDirLen ); Q_StripFilename( baseDir ); - return true; #endif + return true; } void LaunchVConfig()