make game run with asan, disable broken submodel rendering

This commit is contained in:
mittorn 2021-02-14 21:04:14 +00:00
parent df4c0f2071
commit 42ddf60d26
3 changed files with 4 additions and 4 deletions

View File

@ -779,7 +779,7 @@ static void Mod_LoadWorldLights( const byte *base, const dlump_t *l )
}
count = l->filelen / sizeof( *in );
world->worldlights = out = (mworldlight_t *)Mem_Alloc( count * sizeof( *out ));
world->worldlights = out = (mworldlight_t *)Mem_Alloc( (count+1) * sizeof( *out ));
world->numworldlights = count;
for( i = 0; i < count; i++, in++, out++ )
@ -2811,7 +2811,7 @@ void R_MarkSubmodelVisibleFaces( void )
mextrasurf_t *esrf;
gl_state_t *glm;
int i;
return;
// grab the transformed vieworg
glm = GL_GetCache( e->hCachedMatrix );

View File

@ -27,7 +27,7 @@ public:
RandomRange( float fMin, float fMax) { m_flMin = fMin; m_flMax = fMax; m_bDefined = true; }
RandomRange( const char *szToken )
{
char *mutableToken = new char[Q_strlen(szToken)];
char *mutableToken = new char[Q_strlen(szToken)+1];
strcpy(mutableToken, szToken);
char *cOneDot = NULL;
m_bDefined = true;

View File

@ -785,7 +785,7 @@ void CVoiceStatus::FreeBitmaps()
delete m_pAckBitmap;
m_pAckBitmap = NULL;
delete m_pSpeakerLabelIcon;
delete (vgui::BitmapTGA*)m_pSpeakerLabelIcon;
m_pSpeakerLabelIcon = NULL;
delete m_pScoreboardNeverSpoken;