forked from github/server
ufindhash negative ids assert
This commit is contained in:
parent
a59a80d35e
commit
1d47c99f18
1 changed files with 7 additions and 3 deletions
|
@ -659,9 +659,13 @@ uunhash (unit * u)
|
|||
unit *
|
||||
ufindhash (int i)
|
||||
{
|
||||
unit * u = unithash[i % UMAXHASH];
|
||||
while (u && u->no!=i) u = u->nexthash;
|
||||
return u;
|
||||
assert(i>=0);
|
||||
if (i>=0) {
|
||||
unit * u = unithash[i % UMAXHASH];
|
||||
while (u && u->no!=i) u = u->nexthash;
|
||||
return u;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#define FMAXHASH 2039
|
||||
|
|
Loading…
Reference in a new issue