From d8ea5cdad9c934f373dfc1158fea7fe165871210 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Thu, 7 Jul 2011 22:09:09 +0000 Subject: [PATCH] - fixed: BlockLinesIterator::Next could get stuck in rare situations where validcount was altered while the iterator was still running. This should probably be dealt with by using another marking method but at least this prevents the engine from freezing. SVN r3268 (trunk) --- src/p_map.cpp | 2 +- src/p_maputl.cpp | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/p_map.cpp b/src/p_map.cpp index 1230aedee8..9e927698b9 100644 --- a/src/p_map.cpp +++ b/src/p_map.cpp @@ -330,7 +330,7 @@ bool P_TeleportMove (AActor *thing, fixed_t x, fixed_t y, fixed_t z, bool telefr FBlockLinesIterator it(box); line_t *ld; - // P_LineOpening requires the thing's z to be the destination ú‹ order to work. + // P_LineOpening requires the thing's z to be the destination ín order to work. fixed_t savedz = thing->z; thing->z = z; while ((ld = it.Next())) diff --git a/src/p_maputl.cpp b/src/p_maputl.cpp index 187de226d7..9cd2a34b8c 100644 --- a/src/p_maputl.cpp +++ b/src/p_maputl.cpp @@ -721,15 +721,12 @@ line_t *FBlockLinesIterator::Next() { line_t *ld = &lines[*list]; + list++; if (ld->validcount != validcount) { ld->validcount = validcount; return ld; } - else - { - list++; - } } }