From: Rudolf Polzer Date: Tue, 5 Oct 2010 09:24:42 +0000 (+0200) Subject: fix "ExpandPath called without qdir set" as qdir is never set in Xonotic/Nexuiz/any... X-Git-Tag: xonotic-v0.5.0~198 X-Git-Url: https://de.git.xonotic.org/?a=commitdiff_plain;h=4487b4d44f68326bd081117f1950bece5fcd3998;p=xonotic%2Fnetradiant.git fix "ExpandPath called without qdir set" as qdir is never set in Xonotic/Nexuiz/any other nonquake --- diff --git a/tools/quake3/common/cmdlib.c b/tools/quake3/common/cmdlib.c index 4e84b207..fac9bdbb 100644 --- a/tools/quake3/common/cmdlib.c +++ b/tools/quake3/common/cmdlib.c @@ -250,9 +250,7 @@ char *ExpandArg (const char *path) char *ExpandPath (const char *path) { static char full[1024]; - if (!*qdir) - Error ("ExpandPath called without qdir set"); - if (path[0] == '/' || path[0] == '\\' || path[1] == ':') { + if (!*qdir || path[0] == '/' || path[0] == '\\' || path[1] == ':') { strcpy( full, path ); return full; } @@ -263,8 +261,8 @@ char *ExpandPath (const char *path) char *ExpandGamePath (const char *path) { static char full[1024]; - if (!*qdir) - Error ("ExpandGamePath called without qdir set"); + if (!*gamedir) + Error ("ExpandGamePath called without gamedir set"); if (path[0] == '/' || path[0] == '\\' || path[1] == ':') { strcpy( full, path ); return full;