X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=lib%2Fdebug.c;h=a2bf9ee63242387fe8375c998fe5fa7ae1438c04;hb=45ce2fe369cead248855111baa5fe0c0495acf69;hp=e3229901502f1d0da3306b640faa1b57955ef5ef;hpb=54f1c58cef6764fdd611eedc267e7491e777c09b;p=Project_algorithmic_C.git diff --git a/lib/debug.c b/lib/debug.c index e322990..a2bf9ee 100644 --- a/lib/debug.c +++ b/lib/debug.c @@ -22,5 +22,5 @@ void dbg_mvprintw(int base_y, int base_x, const char* fmt, va_list varglist) { - mvprintw(base_y, base_x - strlen(fmt)/2, fmt, varglist); + mvprintw(base_y, base_x - snprintf(NULL, 0, fmt, varglist)/2, fmt, varglist); }