Explorar o código

Replace uint64_t with signed type to prevent overflow on substraction

Ivan Savenko hai 1 ano
pai
achega
7445e950ba
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      AI/Nullkiller/Analyzers/ArmyManager.h

+ 1 - 1
AI/Nullkiller/Analyzers/ArmyManager.h

@@ -32,7 +32,7 @@ struct SlotInfo
 struct ArmyUpgradeInfo
 {
 	std::vector<SlotInfo> resultingArmy;
-	uint64_t upgradeValue = 0;
+	int64_t upgradeValue = 0;
 	TResources upgradeCost;
 
 	void addArmyToBuy(std::vector<SlotInfo> army);