From 898140fbda5eb36ecdbca25e84c0fad576888d63 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Fri, 28 Oct 2022 00:34:46 +0200 Subject: [PATCH] Don't read payload.extra, if not needed. --- public/client/TracyProfiler.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/public/client/TracyProfiler.cpp b/public/client/TracyProfiler.cpp index ea168e4f..a6017397 100644 --- a/public/client/TracyProfiler.cpp +++ b/public/client/TracyProfiler.cpp @@ -3329,10 +3329,8 @@ bool Profiler::HandleServerQuery() uint8_t type; uint64_t ptr; - uint32_t extra; memcpy( &type, &payload.type, sizeof( payload.type ) ); memcpy( &ptr, &payload.ptr, sizeof( payload.ptr ) ); - memcpy( &extra, &payload.extra, sizeof( payload.extra ) ); switch( type ) { @@ -3379,7 +3377,7 @@ bool Profiler::HandleServerQuery() break; #ifndef TRACY_NO_CODE_TRANSFER case ServerQuerySymbolCode: - HandleSymbolCodeQuery( ptr, extra ); + HandleSymbolCodeQuery( ptr, payload.extra ); break; #endif case ServerQuerySourceCode: @@ -3396,7 +3394,7 @@ bool Profiler::HandleServerQuery() break; case ServerQueryDataTransferPart: memcpy( m_queryDataPtr, &ptr, 8 ); - memcpy( m_queryDataPtr+8, &extra, 4 ); + memcpy( m_queryDataPtr+8, &payload.extra, 4 ); m_queryDataPtr += 12; AckServerQuery(); break;