From a648fd0ea63540261918316dcc5e01e90a68f929 Mon Sep 17 00:00:00 2001 From: Jan Kiene Date: Mon, 10 Feb 2025 12:09:08 +0100 Subject: [PATCH] fix res ouput id > 9 --- lib_debug/debug.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib_debug/debug.c b/lib_debug/debug.c index 6f1a4cc73..d8cdd6c8b 100644 --- a/lib_debug/debug.c +++ b/lib_debug/debug.c @@ -39,6 +39,7 @@ #include "options.h" #ifdef DEBUGGING #include "debug.h" +#include #ifdef DEBUG_MODE_INFO #ifdef DEBUG_MODE_INFO_TWEAK #include @@ -778,11 +779,13 @@ char *fname( const int16_t id, const int16_t enc_dec ) { - char idd[5] = ".idX"; - idd[3] = (char) ( id + '0' ); #ifdef DEBUG_FORCE_DIR size_t len; #endif + char idd[6]; + + assert( id < 100 ); + sprintf( idd, ".id%d", id ); strcpy( tmp_fname, dir ); #ifdef DEBUG_FORCE_DIR -- GitLab