qdir is an array, not a pointer, so `if (qdir)` is always true.
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] == ':' ) {
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] == ':' ) {