From 7fcc1ec40cbfb978e992071b04fe56a6c1fdf7a3 Mon Sep 17 00:00:00 2001 From: glx Date: Tue, 22 Aug 2006 22:59:42 +0000 Subject: [PATCH] (svn r6059) -Fix(r6049): FOR_ALL was not use to not skip invalid items, so really don't skip invalid items :) --- engine.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engine.c b/engine.c index d9ff4b01a9..0bcce29042 100644 --- a/engine.c +++ b/engine.c @@ -459,7 +459,7 @@ static void EngineRenewPoolNewBlock(uint start_item) /* We don't use FOR_ALL here, because FOR_ALL skips invalid items. * TODO - This is just a temporary stage, this will be removed. */ - for (er = GetEngineRenew(start_item); er != NULL; er = (er->index + 1 < GetEngineRenewPoolSize()) ? GetEngineRenew(er->index + 1) : NULL) if (er->from != INVALID_ENGINE) { + for (er = GetEngineRenew(start_item); er != NULL; er = (er->index + 1 < GetEngineRenewPoolSize()) ? GetEngineRenew(er->index + 1) : NULL) { er->index = start_item++; er->from = INVALID_ENGINE; } @@ -472,7 +472,7 @@ static EngineRenew *AllocateEngineRenew(void) /* We don't use FOR_ALL here, because FOR_ALL skips invalid items. * TODO - This is just a temporary stage, this will be removed. */ - for (er = GetEngineRenew(0); er != NULL; er = (er->index + 1 < GetEngineRenewPoolSize()) ? GetEngineRenew(er->index + 1) : NULL) if (er->from != INVALID_ENGINE) { + for (er = GetEngineRenew(0); er != NULL; er = (er->index + 1 < GetEngineRenewPoolSize()) ? GetEngineRenew(er->index + 1) : NULL) { if (IsValidEngineRenew(er)) continue; er->to = INVALID_ENGINE;