mirror of
https://github.com/alliedmodders/metamod-source.git
synced 2025-12-06 18:08:31 +00:00
Fix lptr being uninitialized when getcwd fails.
This commit is contained in:
parent
46fdd044ce
commit
da8a5cb05d
@ -130,7 +130,6 @@ mm_DetectGameInformation()
|
||||
|
||||
char temp_path[PLATFORM_MAX_PATH];
|
||||
char cur_path[PLATFORM_MAX_PATH];
|
||||
getcwd(cur_path, sizeof(cur_path));
|
||||
|
||||
char *ptr;
|
||||
const char *lptr;
|
||||
@ -162,7 +161,10 @@ mm_DetectGameInformation()
|
||||
else
|
||||
{
|
||||
ptr = val;
|
||||
lptr = cur_path;
|
||||
if (getcwd(cur_path, sizeof(cur_path)))
|
||||
lptr = cur_path;
|
||||
else
|
||||
lptr = "";
|
||||
}
|
||||
|
||||
const char *pRelPath = is_source2 ? "../../" : "";
|
||||
|
||||
Loading…
Reference in New Issue
Block a user