fix(SaveVehicles): Crash on load #418 (#434)

Fixes #418
This commit is contained in:
Aure7138 2022-08-31 00:16:07 +08:00 committed by GitHub
parent 25c754ffa6
commit 8a3998285a

View File

@ -174,7 +174,7 @@ namespace big
if (VEHICLE::IS_THIS_MODEL_A_CAR(ENTITY::GET_ENTITY_MODEL(vehicle)) || VEHICLE::IS_THIS_MODEL_A_BIKE(ENTITY::GET_ENTITY_MODEL(vehicle)))
{
VEHICLE::SET_VEHICLE_WHEEL_TYPE(vehicle, vehicle_json[wheel_type_key]);
for (int i = MOD_SPOILERS; i <= MOD_LIGHTBAR; i++)
for (int i = MOD_SPOILERS; i < MOD_LIGHTBAR; i++)
{
const bool has_mod = !vehicle_json[mod_names[i]].is_null();
if (has_mod)