Changed scope of nBytes in StringTable_BitRead

This commit is contained in:
Gabriel Huber 2016-04-26 04:04:28 +02:00
parent 3a36da8a82
commit 99426dc6ef

View File

@ -56,7 +56,6 @@ static void StringTable_BitRead(NetHandlers::BitRead& bitbuf, SourceGameContext&
const int MAX_USERDATA_BITS = 14;
unsigned char tempbuf[(1 << MAX_USERDATA_BITS)] = { 0 };
const void *pUserData = NULL;
int nBytes = 0;
if (bitbuf.ReadOneBit() != 0)
{
if (data->isUserDataFixedSize)
@ -65,7 +64,7 @@ static void StringTable_BitRead(NetHandlers::BitRead& bitbuf, SourceGameContext&
}
else
{
nBytes = bitbuf.ReadUBitLong(MAX_USERDATA_BITS);
int nBytes = bitbuf.ReadUBitLong(MAX_USERDATA_BITS);
bitbuf.ReadBytes(tempbuf, nBytes);
}
pUserData = tempbuf;