فهرست منبع

fix crash with 8th creature and portal of s.

Laserlicht 1 سال پیش
والد
کامیت
758666d99d
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      client/windows/CKingdomInterface.cpp

+ 1 - 1
client/windows/CKingdomInterface.cpp

@@ -866,7 +866,7 @@ void CTownItem::update()
 
 
 	heroes->update();
 	heroes->update();
 
 
-	for (size_t i=0; i<town->creatures.size(); i++)
+	for (size_t i=0; i<std::min(static_cast<int>(town->creatures.size()), GameConstants::CREATURES_PER_TOWN); i++)
 	{
 	{
 		growth[i]->update();
 		growth[i]->update();
 		available[i]->update();
 		available[i]->update();