From f04d844515ea67b7b78c7c4e299867a012e832f4 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Wed, 12 Jun 2024 23:54:25 +0200 Subject: [PATCH] Use strlen to calculate end of string in ShortenZoneName(). --- profiler/src/profiler/TracyUtility.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/profiler/src/profiler/TracyUtility.cpp b/profiler/src/profiler/TracyUtility.cpp index 14746f39..93190297 100644 --- a/profiler/src/profiler/TracyUtility.cpp +++ b/profiler/src/profiler/TracyUtility.cpp @@ -25,9 +25,7 @@ const char* ShortenZoneName( ShortenName type, const char* name, ImVec2& tsz, fl static char buf[64*1024]; char tmp[64*1024]; - auto end = name; - while( *end ) end++; - + auto end = name + strlen( name ); auto ptr = name; auto dst = tmp; int cnt = 0;