mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +02:00
Fix sizeof-pointer memset in FOV debug clear
gubFOVDebugInfoInfo is a heap-allocated UINT8*, so sizeof() on it only covered the pointer, not the WORLD_MAX-sized buffer it points to. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
committed by
majcosta
co-authored by
Claude Sonnet 5
parent
8b80466a7d
commit
3a3d42d2a6
+1
-1
@@ -410,7 +410,7 @@ void RevealRoofsAndItems(SOLDIERTYPE *pSoldier, UINT32 itemsToo, BOOLEAN fShowLo
|
||||
#ifdef _DEBUG
|
||||
if ( _KeyDown( NUM_LOCK ) )
|
||||
{
|
||||
memset( gubFOVDebugInfoInfo, 0, sizeof( gubFOVDebugInfoInfo ) );
|
||||
memset( gubFOVDebugInfoInfo, 0, WORLD_MAX );
|
||||
|
||||
SetRenderFlags( RENDER_FLAG_FULL );
|
||||
RenderWorld( );
|
||||
|
||||
Reference in New Issue
Block a user