1
0
Fork 0

Codefix: potential integer overflow before widening integer

pull/13801/head
Rubidium 2025-03-12 20:42:17 +01:00
parent 0fde979b21
commit 2f9d4fe21b
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] int64_t speed = v->GetCurrentSpeed(); // [km/h-ish]
/* Weight is stored in tonnes. */ /* 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. /* Power is stored in HP, we need it in watts.
* Each vehicle can have U16 power, 128 vehicles, HP -> watt * Each vehicle can have U16 power, 128 vehicles, HP -> watt