diff --git a/client/TracyProfiler.cpp b/client/TracyProfiler.cpp index 5cbce936..f5e8379b 100644 --- a/client/TracyProfiler.cpp +++ b/client/TracyProfiler.cpp @@ -2315,13 +2315,15 @@ void Profiler::SendCallstackFrame( uint64_t ptr ) bool Profiler::HandleServerQuery() { + ServerQueryPacket payload; + if( !m_sock->Read( &payload, sizeof( payload ), 10 ) ) return false; + uint8_t type; uint64_t ptr; uint32_t extra; - - if( !m_sock->Read( &type, sizeof( type ), 10 ) ) return false; - if( !m_sock->Read( &ptr, sizeof( ptr ), 10 ) ) return false; - if( !m_sock->Read( &extra, sizeof( extra ), 10 ) ) return false; + memcpy( &type, &payload.type, sizeof( payload.type ) ); + memcpy( &ptr, &payload.ptr, sizeof( payload.ptr ) ); + memcpy( &extra, &payload.extra, sizeof( payload.extra ) ); switch( type ) {