diff options
author | Bartosz Taudul <wolf@nereid.pl> | 2022-01-29 17:53:50 +0300 |
---|---|---|
committer | Bartosz Taudul <wolf@nereid.pl> | 2022-01-29 17:53:50 +0300 |
commit | 361782f3fdbeaefb9697f8fabe9d14e6b5d18f75 (patch) | |
tree | fde7bd00d95336950b86388138842d6f39e0765e /server/TracyPrint.cpp | |
parent | df96293477dfe08d972acd981bda1e4f26bf2bba (diff) |
Fix edge case triggered by mouse being out-of-window.
Diffstat (limited to 'server/TracyPrint.cpp')
-rw-r--r-- | server/TracyPrint.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/server/TracyPrint.cpp b/server/TracyPrint.cpp index 1aa4bcd2..86b01c7f 100644 --- a/server/TracyPrint.cpp +++ b/server/TracyPrint.cpp @@ -257,9 +257,16 @@ const char* TimeToStringExact( int64_t _ns ) const auto h = int64_t( ns / ( 1000ll * 1000 * 1000 * 60 * 60 ) - d * 24 ); const auto m = int64_t( ns / ( 1000ll * 1000 * 1000 * 60 ) - d * ( 60 * 24 ) - h * 60 ); const auto s = int64_t( ns / ( 1000ll * 1000 * 1000 ) - d * ( 60 * 60 * 24 ) - h * ( 60 * 60 ) - m * 60 ); - assert( d < 100 ); - PrintTinyInt( buf, d ); - *buf++ = 'd'; + if( d < 100 ) + { + PrintTinyInt( buf, d ); + *buf++ = 'd'; + } + else + { + memcpy( buf, "100+d", 5 ); + buf += 5; + } PrintTinyInt0( buf, h ); *buf++ = ':'; PrintTinyInt0( buf, m ); |