(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:
Markus Armbruster 2004-02-24 18:19:57 +00:00
parent 5233f7029f
commit c53438e7a0
3 changed files with 17 additions and 0 deletions

View file

@ -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;
}