Initialize engine_path when abspath fails.

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

View File

@ -375,7 +375,13 @@ void InitializeVSP()
break;
}
}
abspath(engine_path, engine_file);
/* If this fails the file either does not exist or
* on Windows the buffer may be too small. */
if (abspath(engine_path, engine_file) == NULL)
{
engine_path[0] = '\0';
}
const char *usepath = metamod_path.c_str();
if (UTIL_Relatize(rel_path, sizeof(rel_path), engine_path, metamod_path.c_str()))