From 0ec81a7a6a77a5ad999add316be7e1f578ca7da2 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 f1cfa928a..23de1bd36 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 @@ -771,8 +772,10 @@ char *fname( const int16_t id, const int16_t enc_dec ) { - char idd[5] = ".idX"; - idd[3] = (char) ( id + '0' ); + char idd[6]; + + assert( id < 100 ); + sprintf( idd, ".id%d", id ); strcpy( tmp_fname, dir ); strcat( tmp_fname, file ); -- GitLab