diff --git a/src/game/server/util.cpp b/src/game/server/util.cpp index 89148014e..51b1f4c8d 100644 --- a/src/game/server/util.cpp +++ b/src/game/server/util.cpp @@ -2154,11 +2154,11 @@ void UTIL_SetClientVisibilityPVS( edict_t *pClient, const unsigned char *pvs, in g_CheckClient.m_bClientPVSIsExpanded = false; - unsigned *pFrom = (unsigned *)pvs; - unsigned *pMask = (unsigned *)g_CheckClient.m_checkPVS; - unsigned *pTo = (unsigned *)g_CheckClient.m_checkVisibilityPVS; + size_t *pFrom = (size_t *)pvs; + size_t *pMask = (size_t *)g_CheckClient.m_checkPVS; + size_t *pTo = (size_t *)g_CheckClient.m_checkVisibilityPVS; - int limit = pvssize / 4; + int limit = pvssize / static_cast( sizeof(size_t) ); int i; for ( i = 0; i < limit; i++ ) @@ -2171,7 +2171,7 @@ void UTIL_SetClientVisibilityPVS( edict_t *pClient, const unsigned char *pvs, in } } - int remainder = pvssize % 4; + int remainder = pvssize % static_cast( sizeof(size_t) ); for ( i = 0; i < remainder; i++ ) { ((unsigned char *)&pTo[limit])[i] = ((unsigned char *)&pFrom[limit])[i] & ~((unsigned char *)&pMask[limit])[i];