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:
parent
f18502a1d1
commit
a0fa4550a8
8 changed files with 11 additions and 11 deletions
|
@ -431,9 +431,9 @@ share_bmap(natid from, natid to, struct nstr_sect *ns, char des,
|
|||
from_des &= ~0x20;
|
||||
|
||||
while (nxtsct(ns, §)) {
|
||||
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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue