diff --git a/physics/components/fizparser.cpp b/physics/components/fizparser.cpp index 4aabe9a75..ece8c004c 100644 --- a/physics/components/fizparser.cpp +++ b/physics/components/fizparser.cpp @@ -447,7 +447,7 @@ bool physics::Vehicle::readWiperList(std::string const &line) WriteLog("Read WiperList: number of entries exceeded capacity of the data table"); return false; } - // the mask of the wipers is a number: read into the uint8_t directly, the parser would take only its first character + // the mask of the wipers is a number: read into an int and clamped, as the parser would take only its first character for a uint8_t int bytesum{0}; parser >> bytesum >> WiperList[idx].WiperSpeed >> WiperList[idx].interval >> WiperList[idx].outBackDelay; WiperList[idx].byteSum = static_cast(std::clamp(bytesum, 0, 255));