From d301f5873d8efeb18619454408f1824fcdf6b950 Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Mon, 10 Jan 2011 15:31:40 +0000 Subject: [PATCH] - bugfix for multi-build bug found by tomreyn (looks like an infinite loop) --- source/glest_game/world/unit_updater.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/glest_game/world/unit_updater.cpp b/source/glest_game/world/unit_updater.cpp index 035fc3fb8..39cfd6d32 100644 --- a/source/glest_game/world/unit_updater.cpp +++ b/source/glest_game/world/unit_updater.cpp @@ -1109,7 +1109,7 @@ Unit * UnitUpdater::findPeerUnitBuilder(Unit *unit) { if(prct != NULL) { SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__); - if(command->getStateValue() == peerUnit->getId()) { + if(unit != peerUnit && command->getStateValue() == peerUnit->getId()) { SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__); firstLinkedPeerRepairer = peerUnit;