From e495747b888a90af7107c6fa86487652372d8dea Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Wed, 20 Jun 2018 17:02:05 +0200 Subject: [PATCH] Fix off-by-one. --- client/TracyCallstack.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/TracyCallstack.hpp b/client/TracyCallstack.hpp index 7322b704..ea65bb1e 100644 --- a/client/TracyCallstack.hpp +++ b/client/TracyCallstack.hpp @@ -38,7 +38,7 @@ CallstackEntry DecodeCallstackPtr( uint64_t ptr ); static tracy_force_inline void* Callstack( int depth ) { - assert( depth >= 1 && depth <= 63 ); + assert( depth >= 1 && depth < 63 ); auto trace = (uintptr_t*)tracy_malloc( ( 1 + depth ) * sizeof( uintptr_t ) ); const auto num = RtlCaptureStackBackTrace( 0, depth, (void**)( trace+1 ), nullptr );