From 54620f87f46f6ca7bf842e2a510508dc4ca80190 Mon Sep 17 00:00:00 2001 From: Markus Uhlin Date: Tue, 11 Mar 2025 23:28:20 +0100 Subject: who_terse: fixed possibly uninitialized value 'rat' --- FICS/comproc.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'FICS/comproc.c') diff --git a/FICS/comproc.c b/FICS/comproc.c index 6e82040..ca04f22 100644 --- a/FICS/comproc.c +++ b/FICS/comproc.c @@ -37,6 +37,8 @@ plogins: fscanf: added width specification Markus Uhlin 25/03/08 Calc string length once + Markus Uhlin 25/03/11 Fixed possibly uninitialized + value 'rat' in who_terse(). */ #include "stdinclude.h" @@ -843,6 +845,8 @@ who_terse(int p, int num, int *plist, int type) rat = parray[p1].s_stats.rating; else if (type == light_rat) rat = parray[p1].l_stats.rating; + else // Fallback to std... + rat = parray[p1].s_stats.rating; if (type == none) { strlcpy(ptmp, " ", sizeof ptmp); -- cgit v1.2.3