From da5116fb9595f51c6173768526eabce2d0a98f41 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sun, 1 Oct 2023 09:57:40 +0300 Subject: [PATCH 26/26] Fix wipe_unit_full() dead "conqsize" initialization See osdn #48776 Signed-off-by: Marko Lindqvist --- server/unittools.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/server/unittools.c b/server/unittools.c index 715fb43238..de370a0fd3 100644 --- a/server/unittools.c +++ b/server/unittools.c @@ -2040,16 +2040,18 @@ static void wipe_unit_full(struct unit *punit, bool transported, } } - { /* Try to submit some cities */ + { + /* Try to submit some cities */ int vcsize = city_list_size(pplayer->cities); int evcsize = vcsize; - int conqsize = evcsize; + int conqsize; if (evcsize < 3) { evcsize = 0; } else { evcsize -=3; } + /* About a quarter on average with high numbers less probable */ conqsize = fc_rand(fc_rand(evcsize)); -- 2.40.1