Fixed fate error about number of wheels (#7800)

This commit is contained in:
evilzs1 2024-06-18 18:04:40 +08:00 committed by GitHub
parent 18035969fe
commit ec7d8fd037
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -37,12 +37,12 @@ void CarlaRecorderAnimWheels::Read(std::istream &InFile)
ReadValue<uint32_t>(InFile, DatabaseId);
uint32_t NumWheels = 0;
ReadValue<uint32_t>(InFile, NumWheels);
WheelValues.reserve(NumWheels);
WheelValues.resize(NumWheels);
for (size_t i = 0; i < NumWheels; ++i)
{
WheelInfo Wheel;
Wheel.Read(InFile);
WheelValues.push_back(Wheel);
WheelValues[i] = Wheel;
}
}