mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-31 13:10:34 +00:00
[libr] Fix loop counter in removeObjectNoRelease
It would do 4G iterations if count was 0.
This commit is contained in:
parent
6d3fadfe6e
commit
0a63d0a0de
1 changed files with 3 additions and 3 deletions
|
@ -20,14 +20,14 @@
|
|||
local unsigned i = count;
|
||||
local unsigned tmp;
|
||||
|
||||
do {
|
||||
if (_objs[--i] == anObject) {
|
||||
while (i-- > 0) {
|
||||
if (_objs[i] == anObject) {
|
||||
for (tmp = i; tmp < count - 1; tmp++) {
|
||||
_objs[tmp] = _objs[tmp + 1];
|
||||
}
|
||||
count--;
|
||||
}
|
||||
} while (i);
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
Loading…
Reference in a new issue