1
0
Fork 0

Codefix: potential integer overflow before widening integer

pull/13777/head
Rubidium 2025-03-12 20:42:17 +01:00 committed by rubidium42
parent 02f1bc0880
commit 35ef197be4
1 changed files with 1 additions and 1 deletions

View File

@ -110,7 +110,7 @@ int GroundVehicle<T, Type>::GetAcceleration() const
int64_t speed = v->GetCurrentSpeed(); // [km/h-ish]
/* Weight is stored in tonnes. */
int32_t mass = this->gcache.cached_weight;
int64_t mass = this->gcache.cached_weight;
/* Power is stored in HP, we need it in watts.
* Each vehicle can have U16 power, 128 vehicles, HP -> watt