mirror of
https://github.com/alliedmodders/metamod-source.git
synced 2025-12-07 02:18:30 +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 temp_path[PLATFORM_MAX_PATH];
|
||||||
char cur_path[PLATFORM_MAX_PATH];
|
char cur_path[PLATFORM_MAX_PATH];
|
||||||
getcwd(cur_path, sizeof(cur_path));
|
|
||||||
|
|
||||||
char *ptr;
|
char *ptr;
|
||||||
const char *lptr;
|
const char *lptr;
|
||||||
@ -162,7 +161,10 @@ mm_DetectGameInformation()
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
ptr = val;
|
ptr = val;
|
||||||
lptr = cur_path;
|
if (getcwd(cur_path, sizeof(cur_path)))
|
||||||
|
lptr = cur_path;
|
||||||
|
else
|
||||||
|
lptr = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *pRelPath = is_source2 ? "../../" : "";
|
const char *pRelPath = is_source2 ? "../../" : "";
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user