0
0
Fork 0
mirror of https://git.code.sf.net/p/quake/quakeforge synced 2025-03-01 15:01:00 +00:00

[libr] Fix loop counter in removeObjectNoRelease

It would do 4G iterations if count was 0.
This commit is contained in:
Bill Currie 2020-03-30 16:25:54 +09:00
parent 6d3fadfe6e
commit 0a63d0a0de

View file

@ -20,14 +20,14 @@
local unsigned i = count; local unsigned i = count;
local unsigned tmp; local unsigned tmp;
do { while (i-- > 0) {
if (_objs[--i] == anObject) { if (_objs[i] == anObject) {
for (tmp = i; tmp < count - 1; tmp++) { for (tmp = i; tmp < count - 1; tmp++) {
_objs[tmp] = _objs[tmp + 1]; _objs[tmp] = _objs[tmp + 1];
} }
count--; count--;
} }
} while (i); }
} }
@end @end