mirror of https://github.com/OpenTTD/OpenTTD
Codefix: potential integer overflow before widening integer
parent
02f1bc0880
commit
35ef197be4
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue