From 4487b4d44f68326bd081117f1950bece5fcd3998 Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Tue, 5 Oct 2010 11:24:42 +0200 Subject: [PATCH] fix "ExpandPath called without qdir set" as qdir is never set in Xonotic/Nexuiz/any other nonquake --- tools/quake3/common/cmdlib.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tools/quake3/common/cmdlib.c b/tools/quake3/common/cmdlib.c index 4e84b20..fac9bdb 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; -- 2.39.2