diff --git a/client/mapHandler.cpp b/client/mapHandler.cpp index 667dafd48..8f17fdc8a 100644 --- a/client/mapHandler.cpp +++ b/client/mapHandler.cpp @@ -569,7 +569,7 @@ void CMapHandler::CMapWorldViewBlitter::drawOverlayEx(SDL_Surface * targetSurf) continue; realPos.x = initPos.x + (iconInfo.pos.x - topTile.x) * tileSize; - realPos.y = initPos.x + (iconInfo.pos.y - topTile.y) * tileSize; + realPos.y = initPos.y + (iconInfo.pos.y - topTile.y) * tileSize; auto wvIcon = this->objectToIcon(iconInfo.id, iconInfo.subId, iconInfo.owner); diff --git a/client/windows/GUIClasses.cpp b/client/windows/GUIClasses.cpp index 3989e7ae0..950952490 100644 --- a/client/windows/GUIClasses.cpp +++ b/client/windows/GUIClasses.cpp @@ -918,7 +918,7 @@ std::function CExchangeController::onSwapArmy() { GsThread::run([=] { - if(right->tempOwner != cb->getMyColor() + if(left->tempOwner != cb->getMyColor() || right->tempOwner != cb->getMyColor()) { return; diff --git a/lib/mapObjects/CRewardableConstructor.cpp b/lib/mapObjects/CRewardableConstructor.cpp index 4a6442eb7..43c635b3b 100644 --- a/lib/mapObjects/CRewardableConstructor.cpp +++ b/lib/mapObjects/CRewardableConstructor.cpp @@ -126,7 +126,7 @@ void CRandomRewardObjectInfo::configureObject(CRewardableObject * object, CRando object->canRefuse = parameters["canRefuse"].Bool(); auto visitMode = parameters["visitMode"].String(); - for(int i = 0; Rewardable::VisitModeString.size(); ++i) + for(int i = 0; i < Rewardable::VisitModeString.size(); ++i) { if(Rewardable::VisitModeString[i] == visitMode) { @@ -136,7 +136,7 @@ void CRandomRewardObjectInfo::configureObject(CRewardableObject * object, CRando } auto selectMode = parameters["selectMode"].String(); - for(int i = 0; Rewardable::SelectModeString.size(); ++i) + for(int i = 0; i < Rewardable::SelectModeString.size(); ++i) { if(Rewardable::SelectModeString[i] == selectMode) {