diff --git a/public/tier1/bitbuf.h b/public/tier1/bitbuf.h index 06577a7e..9ffc8b3c 100644 --- a/public/tier1/bitbuf.h +++ b/public/tier1/bitbuf.h @@ -1213,20 +1213,26 @@ FORCEINLINE float CBitRead::ReadFloat( void ) #endif FORCEINLINE unsigned int CBitRead::ReadUBitVar( void ) { - switch( ReadUBitLong( 2 ) ) + unsigned int ret = ReadUBitLong( 2 ); + switch( ret ) { case 0: - return ReadUBitLong( 4 ); + ret = ReadUBitLong( 4 ); + break; case 1: - return ReadUBitLong( 8 ); + ret = ReadUBitLong( 8 ); + break; case 2: - return ReadUBitLong( 12 ); + ret = ReadUBitLong( 12 ); + break; case 3: - return ReadUBitLong( 32 ); + ret = ReadUBitLong( 32 ); + break; } + return ret; } #ifdef _WIN32 #pragma warning(pop)