Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/wolfpld/tracy.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBartosz Taudul <wolf@nereid.pl>2022-08-15 16:12:20 +0300
committerBartosz Taudul <wolf@nereid.pl>2022-08-15 16:12:20 +0300
commit60f82dfd2e4e05b952bcb9b92808f837872b6711 (patch)
tree5b0925f5c54e99b3ec8c20a2c4c3018a017c27eb /server/TracyView_Utility.cpp
parent0c6acf3c2ea9b8e46bf3093e8c5c2e1def367c1b (diff)
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.
Diffstat (limited to 'server/TracyView_Utility.cpp')
-rw-r--r--server/TracyView_Utility.cpp2
1 files changed, 1 insertions, 1 deletions
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;