mirror of
https://github.com/id-Software/DOOM-3-BFG.git
synced 2025-04-24 02:32:18 +00:00
Static cvars incorrectly checking against wrong size on 64
On 64-bit arch these checks are incorrect. the 0xFFFFFFFF is effectively UINT32_MAX rather than the pointer size. Changing to the unsigned integral pointer maximum seems like a better idea. Fixes the warning, and corrects the code.
This commit is contained in:
parent
e5b3c697d2
commit
29786cf420
1 changed files with 3 additions and 3 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue