Fix lptr being uninitialized when getcwd fails.

This commit is contained in:
Kyle Sanderson 2018-07-17 14:37:35 -07:00 committed by GitHub
parent 46fdd044ce
commit da8a5cb05d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 ? "../../" : "";