From 411ca81786beda8fb52d772af6427bb933e510dd Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Tue, 18 Aug 2020 21:36:09 +0200 Subject: [PATCH] Don't operate on reference. --- client/TracySysTrace.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/client/TracySysTrace.cpp b/client/TracySysTrace.cpp index 228b0454..2824c592 100644 --- a/client/TracySysTrace.cpp +++ b/client/TracySysTrace.cpp @@ -884,8 +884,9 @@ void SysTraceStop() } } -static uint64_t ReadNumber( const char*& ptr ) +static uint64_t ReadNumber( const char*& data ) { + auto ptr = data; assert( *ptr >= '0' && *ptr <= '9' ); uint64_t val = *ptr++ - '0'; for(;;) @@ -895,6 +896,7 @@ static uint64_t ReadNumber( const char*& ptr ) val = val * 10 + v; ptr++; } + data = ptr; return val; }