mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
Fix potential int32_t overflow when computing total army value
This commit is contained in:
@@ -855,7 +855,7 @@ std::string CStackInstance::getName() const
|
||||
ui64 CStackInstance::getPower() const
|
||||
{
|
||||
assert(type);
|
||||
return type->getAIValue() * count;
|
||||
return static_cast<ui64>(type->getAIValue()) * count;
|
||||
}
|
||||
|
||||
ArtBearer::ArtBearer CStackInstance::bearerType() const
|
||||
|
||||
Reference in New Issue
Block a user