Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
832 B

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. //=======================================================================================//
  4. #include "sessioninfoheader.h"
  5. #include "dbg.h"
  6. // memdbgon must be the last include file in a .cpp file!!!
  7. #include "tier0/memdbgon.h"
  8. //----------------------------------------------------------------------------------------
  9. bool ReadSessionInfoHeader( const void *pBuf, int nBufSize, SessionInfoHeader_t &outHeader )
  10. {
  11. if ( nBufSize < sizeof( SessionInfoHeader_t ) )
  12. {
  13. AssertMsg( 0, "Buffer size too small to read session info header" );
  14. return false;
  15. }
  16. // Read the header
  17. V_memcpy( &outHeader, pBuf, sizeof( SessionInfoHeader_t ) );
  18. return true;
  19. }
  20. //----------------------------------------------------------------------------------------