fix "ExpandPath called without qdir set" as qdir is never set in Xonotic/Nexuiz/any other nonquake

This commit is contained in:
Rudolf Polzer 2010-10-05 11:24:42 +02:00
parent c34227108a
commit 4487b4d44f

View File

@ -250,9 +250,7 @@ char *ExpandArg (const char *path)
char *ExpandPath (const char *path) char *ExpandPath (const char *path)
{ {
static char full[1024]; static char full[1024];
if (!*qdir) if (!*qdir || path[0] == '/' || path[0] == '\\' || path[1] == ':') {
Error ("ExpandPath called without qdir set");
if (path[0] == '/' || path[0] == '\\' || path[1] == ':') {
strcpy( full, path ); strcpy( full, path );
return full; return full;
} }
@ -263,8 +261,8 @@ char *ExpandPath (const char *path)
char *ExpandGamePath (const char *path) char *ExpandGamePath (const char *path)
{ {
static char full[1024]; static char full[1024];
if (!*qdir) if (!*gamedir)
Error ("ExpandGamePath called without qdir set"); Error ("ExpandGamePath called without gamedir set");
if (path[0] == '/' || path[0] == '\\' || path[1] == ':') { if (path[0] == '/' || path[0] == '\\' || path[1] == ':') {
strcpy( full, path ); strcpy( full, path );
return full; return full;