Merge pull request #382 from ensiform/x64-staticvar-fix

Static cvars incorrectly checking against wrong size on 64
This commit is contained in:
Robert Beckebans 2017-11-17 12:02:51 +01:00 committed by GitHub
commit d75169010b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -366,7 +366,7 @@ ID_INLINE void idCVar::Init( const char* name, const char* value, int flags, con
this->integerValue = 0;
this->floatValue = 0.0f;
this->internalVar = this;
if( staticVars != ( idCVar* )0xFFFFFFFF )
if( staticVars != ( idCVar* )UINTPTR_MAX )
{
this->next = staticVars;
staticVars = this;
@ -379,13 +379,13 @@ ID_INLINE void idCVar::Init( const char* name, const char* value, int flags, con
ID_INLINE void idCVar::RegisterStaticVars()
{
if( staticVars != ( idCVar* )0xFFFFFFFF )
if( staticVars != ( idCVar* )UINTPTR_MAX )
{
for( idCVar* cvar = staticVars; cvar; cvar = cvar->next )
{
cvarSystem->Register( cvar );
}
staticVars = ( idCVar* )0xFFFFFFFF;
staticVars = ( idCVar* )UINTPTR_MAX;
}
}