From ccfa1e3d443fcb5eb39b37c22ba68d1907cafb44 Mon Sep 17 00:00:00 2001 From: Giovanni Bajo Date: Mon, 14 Oct 2024 15:39:15 +0200 Subject: [PATCH] backtrace: fix skipped number of traces --- src/backtrace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backtrace.c b/src/backtrace.c index 5e5ee8192..3f6585747 100644 --- a/src/backtrace.c +++ b/src/backtrace.c @@ -620,7 +620,7 @@ static void backtrace_foreach(void (*cb)(void *arg, void *ptr), void *arg, uint3 int backtrace(void **buffer, int size) { - int i = -2; // skip backtrace_foreach() and backtrace()) + int i = -1; // Skip backtrace() itself void cb(void *arg, void *ptr) { if (i >= size) return; if (i >= 0)