Browse Source

Fix building state message

Jamo 1 month ago
parent
commit
fcd42124fc
1 changed files with 1 additions and 1 deletions
  1. 1 1
      client/windows/CCastleInterface.cpp

+ 1 - 1
client/windows/CCastleInterface.cpp

@@ -1854,7 +1854,7 @@ std::string CBuildWindow::getTextForState(EBuildingState state)
 	case EBuildingState::ALREADY_PRESENT:
 	case EBuildingState::ALREADY_PRESENT:
 	case EBuildingState::CANT_BUILD_TODAY:
 	case EBuildingState::CANT_BUILD_TODAY:
 	case EBuildingState::NO_RESOURCES:
 	case EBuildingState::NO_RESOURCES:
-		ret.replace(ret.find_first_of("%s"), 2, building->getNameTranslated());
+		boost::algorithm::replace_first(ret, "%s", building->getNameTranslated());
 		break;
 		break;
 	case EBuildingState::ALLOWED:
 	case EBuildingState::ALLOWED:
 		return LIBRARY->generaltexth->allTexts[219]; //all prereq. are met
 		return LIBRARY->generaltexth->allTexts[219]; //all prereq. are met