From 99426dc6ef1f9405ed369420c4e877abfc450871 Mon Sep 17 00:00:00 2001 From: Gabriel Huber Date: Tue, 26 Apr 2016 04:04:28 +0200 Subject: [PATCH] Changed scope of nBytes in StringTable_BitRead --- demboyz/netmessages/svc_createstringtable.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/demboyz/netmessages/svc_createstringtable.cpp b/demboyz/netmessages/svc_createstringtable.cpp index 5d4baa6..a577286 100644 --- a/demboyz/netmessages/svc_createstringtable.cpp +++ b/demboyz/netmessages/svc_createstringtable.cpp @@ -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;