Use sctstr member sct_uid instead of recomputing it

The old code recomputed it with sctoff() in some places, without
checking for failure.  Not a bug, because it can't actually fail, just
confusing.
This commit is contained in:
Markus Armbruster 2008-03-24 10:53:56 +01:00
parent f18502a1d1
commit a0fa4550a8
8 changed files with 11 additions and 11 deletions

View file

@ -431,9 +431,9 @@ share_bmap(natid from, natid to, struct nstr_sect *ns, char des,
from_des &= ~0x20;
while (nxtsct(ns, &sect)) {
if (!(fromdes = from_bmap[sctoff(ns->x, ns->y)]))
if (!(fromdes = from_bmap[sect.sct_uid]))
continue;
todes = to_bmap[sctoff(ns->x, ns->y)];
todes = to_bmap[sect.sct_uid];
if (todes &&
todes != '?' &&
todes != '.' && todes != ' ' && todes != from_des)