From c469d1f17977cce65597cfa650b647ed31eebfc6 Mon Sep 17 00:00:00 2001 From: Ron Koenderink Date: Tue, 18 Oct 2005 16:11:19 +0000 Subject: [PATCH] (do_conv) Move the initialization of the natp to be inside sector loop, this allows the deity to use the research level of the sector owner. This also fixes the use of an uninitialized sector data structure. --- src/lib/commands/conv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/commands/conv.c b/src/lib/commands/conv.c index 5fb84a06..98b5c9f1 100644 --- a/src/lib/commands/conv.c +++ b/src/lib/commands/conv.c @@ -81,13 +81,13 @@ do_conv(struct nstr_sect nstr, int uwtoconvert, int for_real) struct nstr_item ni; long cost = 0; - natp = getnatp(sect.sct_own); totaluw = 0; while (nxtsct(&nstr, §)) { if (!player->owner) continue; if (sect.sct_oldown == player->cnum) continue; + natp = getnatp(sect.sct_own); maxpop = max_pop(natp->nat_level[NAT_RLEV], §); civ = sect.sct_item[I_CIVIL]; mil = sect.sct_item[I_MILIT];