mirror of
https://github.com/celisej567/source-engine.git
synced 2026-01-03 05:49:41 +03:00
fix address sanitizer issues #2
This commit is contained in:
@@ -109,7 +109,7 @@ private:
|
||||
void audioRecordingCallback( void *userdata, uint8 *stream, int len )
|
||||
{
|
||||
VoiceRecord_SDL *voice = (VoiceRecord_SDL*)userdata;
|
||||
voice->RenderBuffer( stream, len );
|
||||
voice->RenderBuffer( (char*)stream, len );
|
||||
}
|
||||
|
||||
VoiceRecord_SDL::VoiceRecord_SDL() :
|
||||
|
||||
@@ -2751,7 +2751,7 @@ void CL_InitLanguageCvar()
|
||||
else if( szLang )
|
||||
{
|
||||
ELanguage lang = PchLanguageICUCodeToELanguage(szLang, k_Lang_English);
|
||||
char *szShortLang = GetLanguageShortName(lang);
|
||||
const char *szShortLang = GetLanguageShortName(lang);
|
||||
cl_language.SetValue( szShortLang );
|
||||
}
|
||||
else
|
||||
|
||||
@@ -1816,14 +1816,14 @@ void CClientState::FinishSignonState_New()
|
||||
//
|
||||
// This is pretty janky, but doesn't really have any cost (and even makes our one-frozen-frame load screen slightly
|
||||
// less likely to trigger OS "not responding" warnings)
|
||||
extern void V_RenderVGuiOnly();
|
||||
V_RenderVGuiOnly();
|
||||
// extern void V_RenderVGuiOnly();
|
||||
// V_RenderVGuiOnly();
|
||||
|
||||
// Before we do anything with the whitelist, make sure we have the proper map pack mounted
|
||||
// this will load the .bsp by setting the world model the string list at the hardcoded index 1.
|
||||
cl.SetModel( 1 );
|
||||
|
||||
V_RenderVGuiOnly();
|
||||
//V_RenderVGuiOnly();
|
||||
|
||||
// Check for a new whitelist. It's good to do it early in the connection process here because if we wait until later,
|
||||
// the client may have loaded some files w/o the proper whitelist restrictions and we'd have to reload them.
|
||||
|
||||
@@ -865,6 +865,7 @@ CConPanel::CConPanel( vgui::Panel *parent ) : CBasePanel( parent, "CConPanel" )
|
||||
//-----------------------------------------------------------------------------
|
||||
CConPanel::~CConPanel( void )
|
||||
{
|
||||
g_pConPanel = NULL;
|
||||
}
|
||||
|
||||
void CConPanel::Con_NPrintf( int idx, const char *msg )
|
||||
|
||||
@@ -1289,7 +1289,7 @@ public:
|
||||
|
||||
SaveMsg( "DirectoryCopy: AsyncAppend %s, %s\n", szName, pDestFileName );
|
||||
g_pFileSystem->AsyncAppend( pDestFileName, memcpy( new char[MAX_PATH], list[i].szFileName, MAX_PATH), MAX_PATH, true ); // Filename can only be as long as a map name + extension
|
||||
g_pFileSystem->AsyncAppend( pDestFileName, new int(fileSize), sizeof(int), true );
|
||||
g_pFileSystem->AsyncAppend( pDestFileName, memcpy( new char[sizeof(int)], &fileSize, sizeof(int)), sizeof(int), true );
|
||||
g_pFileSystem->AsyncAppendFile( pDestFileName, szName );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2071,11 +2071,11 @@ public:
|
||||
|
||||
|
||||
private:
|
||||
static const Vector m_pNormal;
|
||||
static Vector m_pNormal;
|
||||
static float m_Dist;
|
||||
};
|
||||
|
||||
const Vector CClipPlane::m_pNormal;
|
||||
Vector CClipPlane::m_pNormal;
|
||||
float CClipPlane::m_Dist;
|
||||
|
||||
static inline void ClampTexCoord( ShadowVertex_t *pInVertex, ShadowVertex_t *pOutVertex )
|
||||
|
||||
Reference in New Issue
Block a user