From 60f82dfd2e4e05b952bcb9b92808f837872b6711 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Mon, 15 Aug 2022 15:12:20 +0200 Subject: [PATCH] Fix off-by-one. The null terminator was included during the string copy. The destination pointer points to one-beyond-the-end, and has to be decreased. --- server/TracyView_Utility.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/TracyView_Utility.cpp b/server/TracyView_Utility.cpp index c19cf25f..df94b98a 100644 --- a/server/TracyView_Utility.cpp +++ b/server/TracyView_Utility.cpp @@ -860,7 +860,7 @@ const char* View::ShortenZoneName( const char* name, ImVec2& tsz, float zsz ) co *dst++ = '>'; } - end = dst; + end = dst-1; ptr = tmp; dst = buf; cnt = 0;