From f3d35b3c45b0ab6bcc8de82446e7ff1233ac29bf Mon Sep 17 00:00:00 2001 From: bones_was_here Date: Wed, 20 Dec 2023 17:40:04 +1000 Subject: [PATCH] prvm_leaktest: fix trace string truncation This was caught by the new warnings. Signed-off-by: bones_was_here --- prvm_edict.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/prvm_edict.c b/prvm_edict.c index a03d0bd1..36a44e48 100644 --- a/prvm_edict.c +++ b/prvm_edict.c @@ -220,8 +220,9 @@ const char *PRVM_AllocationOrigin(prvm_prog_t *prog) if(prog->leaktest_active) if(prog->depth > 0) // actually in QC code and not just parsing the entities block of a map/savegame { - buf = (char *)PRVM_Alloc(256); - PRVM_ShortStackTrace(prog, buf, 256); + // bones_was_here: this is the smallest 64 multiple that avoids truncation in Xonotic (was 256) + buf = (char *)PRVM_Alloc(448); + PRVM_ShortStackTrace(prog, buf, 448); } return buf; } -- 2.39.2