mirror of
https://github.com/Detanup01/gbe_fork.git
synced 2025-08-04 06:35:32 +02:00
make sure allocated data ptr in null (not garbage)
This commit is contained in:
parent
d802dba47d
commit
048b9a94cd
1 changed files with 1 additions and 0 deletions
|
@ -109,6 +109,7 @@ SteamNetworkingMessage_t *AllocateMessage( int cbAllocateBuffer )
|
||||||
if (cbAllocateBuffer < 0)
|
if (cbAllocateBuffer < 0)
|
||||||
cbAllocateBuffer = 0;
|
cbAllocateBuffer = 0;
|
||||||
|
|
||||||
|
pMsg->m_pData = nullptr;
|
||||||
if (cbAllocateBuffer)
|
if (cbAllocateBuffer)
|
||||||
pMsg->m_pData = malloc(cbAllocateBuffer);
|
pMsg->m_pData = malloc(cbAllocateBuffer);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue