Skip to content

Commit

Permalink
Don't memset clc. It contains a std::string.
Browse files Browse the repository at this point in the history
  • Loading branch information
DolceTriade committed Apr 11, 2016
1 parent c416d1f commit 76aa82c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion daemon/src/engine/client/cl_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1114,7 +1114,8 @@ void CL_Disconnect( bool showMainMenu )
CL_ClearState();

// wipe the client connection
Com_Memset( &clc, 0, sizeof( clc ) );
clc.~clientConnection_t();
new(&clc) clientConnection_t{}; // Using {} instead of () to work around MSVC bug

if ( !cls.bWWWDlDisconnected )
{
Expand Down

0 comments on commit 76aa82c

Please sign in to comment.