mirror of
https://github.com/alliedmodders/hl2sdk.git
synced 2025-09-20 12:36:05 +08:00
Prepare for TF2 64bits (#127)
* Prepare for 64bits * Add the dynamic and static librairies * Delete choreoobjects_x86_64.a --------- Co-authored-by: Kenzzer <kenzzer@users.noreply.github.com>
This commit is contained in:
@ -2371,7 +2371,7 @@ void KeyValues::RecursiveLoadFromBuffer( char const *resourceName, CUtlBuffer &b
|
||||
|
||||
int ival = strtol( value, &pIEnd, 10 );
|
||||
float fval = (float)strtod( value, &pFEnd );
|
||||
bool bOverflow = ( ival == LONG_MAX || ival == LONG_MIN ) && errno == ERANGE;
|
||||
//bool bOverflow = ( ival == LONG_MAX || ival == LONG_MIN ) && errno == ERANGE;
|
||||
#ifdef POSIX
|
||||
// strtod supports hex representation in strings under posix but we DON'T
|
||||
// want that support in keyvalues, so undo it here if needed
|
||||
@ -2409,7 +2409,7 @@ void KeyValues::RecursiveLoadFromBuffer( char const *resourceName, CUtlBuffer &b
|
||||
dat->m_flValue = fval;
|
||||
dat->m_iDataType = TYPE_FLOAT;
|
||||
}
|
||||
else if (pIEnd == pSEnd && !bOverflow)
|
||||
else if (pIEnd == pSEnd) //&& !bOverflow)
|
||||
{
|
||||
dat->m_iValue = ival;
|
||||
dat->m_iDataType = TYPE_INT;
|
||||
@ -2540,7 +2540,7 @@ bool KeyValues::WriteAsBinary( CUtlBuffer &buffer )
|
||||
}
|
||||
case TYPE_PTR:
|
||||
{
|
||||
buffer.PutUnsignedInt( (int)dat->m_pValue );
|
||||
buffer.PutPtr( dat->m_pValue );
|
||||
}
|
||||
|
||||
default:
|
||||
@ -2644,7 +2644,7 @@ bool KeyValues::ReadAsBinary( CUtlBuffer &buffer, int nStackDepth )
|
||||
}
|
||||
case TYPE_PTR:
|
||||
{
|
||||
dat->m_pValue = (void*)buffer.GetUnsignedInt();
|
||||
dat->m_pValue = buffer.GetPtr();
|
||||
}
|
||||
|
||||
default:
|
||||
|
Reference in New Issue
Block a user