diff --git a/dlls/enttools.h b/dlls/enttools.h index 046c5c89..d8e5e122 100644 --- a/dlls/enttools.h +++ b/dlls/enttools.h @@ -8,7 +8,7 @@ void ENT_RegisterCVars( void ); struct EntoolsEntData { bool enttools; // created by enttools - char ownerid[32]; + char ownerid[33]; }; #endif // ENTTOOLS_H diff --git a/dlls/gravgunmod.cpp b/dlls/gravgunmod.cpp index 3abcabba..5117116d 100644 --- a/dlls/gravgunmod.cpp +++ b/dlls/gravgunmod.cpp @@ -180,10 +180,10 @@ void GGM_ClientPutinServer(edict_t *pEntity, CBasePlayer *pPlayer) pPlayer->gravgunmod_data.m_state = STATE_CONNECTED; const char *uid = GETPLAYERAUTHID( pPlayer->edict() ); - if( strstr(uid, "PENDING") ) + if( !uid || strstr(uid, "PENDING") ) uid = g_engfuncs.pfnInfoKeyValue( g_engfuncs.pfnGetInfoKeyBuffer( pPlayer->edict() ), "ip" ); - strncpy( pPlayer->gravgunmod_data.uid, uid, 31 ); + strncpy( pPlayer->gravgunmod_data.uid, uid, 32 ); pPlayer->gravgunmod_data.uid[32] = 0; pPlayer->gravgunmod_data.m_flEntTime = 0; pPlayer->gravgunmod_data.m_flEntScope = 0; diff --git a/dlls/gravgunmod.h b/dlls/gravgunmod.h index 188becd9..d4afdb11 100644 --- a/dlls/gravgunmod.h +++ b/dlls/gravgunmod.h @@ -55,7 +55,7 @@ struct GGMData int m_iConfirmKey; float m_flEntScope; float m_flEntTime; - char uid[32]; + char uid[33]; }; #endif // GRAVGUNMOD_H