From 62ad08985cf17ed56981e06f4a2172f01738f59a Mon Sep 17 00:00:00 2001 From: Cory McWilliams Date: Thu, 28 Oct 2021 01:11:30 +0000 Subject: [PATCH] Whoops. git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3676 ed5197a5-7fde-0310-b194-c3ffbd925b24 --- src/trace.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/trace.c b/src/trace.c index 9357b7f1..a680c9da 100644 --- a/src/trace.c +++ b/src/trace.c @@ -103,7 +103,7 @@ void tf_trace_begin(tf_trace_t* trace, const char* name) return; } - if (!trace->stack || trace->stack->count + 1 < _countof(trace->stack->names)) + if (!trace->stack || trace->stack->count + 1 > _countof(trace->stack->names)) { tf_trace_stack_t* stack = malloc(sizeof(tf_trace_stack_t)); memset(stack, 0, sizeof(*stack)); @@ -111,7 +111,7 @@ void tf_trace_begin(tf_trace_t* trace, const char* name) trace->stack = stack; } tf_trace_stack_t* stack = trace->stack; - while (stack->count == 0 && stack->next && stack->count + 1 < _countof(trace->stack->names)) + while (stack->count == 0 && stack->next && stack->count + 1 > _countof(trace->stack->names)) { stack = stack->next; }