(ef_ensure_space): New.
(edit): Use it to to fix copying to virgin unit slot. Closes #896475. From Ron Koenderink.
This commit is contained in:
parent
5233f7029f
commit
c53438e7a0
3 changed files with 17 additions and 0 deletions
|
@ -474,3 +474,13 @@ ef_check(int type)
|
|||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
ef_ensure_space(int type, int id, int count)
|
||||
{
|
||||
while (id >= empfile[type].fids) {
|
||||
if (!ef_extend(type, count))
|
||||
return 0;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue