]> git.pond.sub.org Git - empserver/commitdiff
(do_conv) Move the initialization of the natp to be inside sector loop, this
authorRon Koenderink <rkoenderink@yahoo.ca>
Tue, 18 Oct 2005 16:11:19 +0000 (16:11 +0000)
committerRon Koenderink <rkoenderink@yahoo.ca>
Tue, 18 Oct 2005 16:11:19 +0000 (16:11 +0000)
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

index 5fb84a06937d5ea47b58adeb3b93592b0302558f..98b5c9f1c22634ccc5eb73ccf770cb126a854388 100644 (file)
@@ -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, &sect)) {
        if (!player->owner)
            continue;
        if (sect.sct_oldown == player->cnum)
            continue;
+        natp = getnatp(sect.sct_own);\r
        maxpop = max_pop(natp->nat_level[NAT_RLEV], &sect);
        civ = sect.sct_item[I_CIVIL];
        mil = sect.sct_item[I_MILIT];