q3map2: fix bogus empty string checks

qdir is an array, not a pointer, so `if (qdir)` is always true.
This commit is contained in:
Ben Noordhuis 2012-03-17 23:53:12 +01:00
parent ca8d032cfb
commit 997811d430
1 changed files with 2 additions and 2 deletions

View File

@ -244,7 +244,7 @@ char *ExpandArg( const char *path ){
char *ExpandPath( const char *path ){
static char full[1024];
if ( !qdir ) {
if ( !qdir[0] ) {
Error( "ExpandPath called without qdir set" );
}
if ( path[0] == '/' || path[0] == '\\' || path[1] == ':' ) {
@ -257,7 +257,7 @@ char *ExpandPath( const char *path ){
char *ExpandGamePath( const char *path ){
static char full[1024];
if ( !qdir ) {
if ( !qdir[0] ) {
Error( "ExpandGamePath called without qdir set" );
}
if ( path[0] == '/' || path[0] == '\\' || path[1] == ':' ) {