For example, OceanLab Megamix contains spurious control characters in some BPM values. StepMania appears to use the C++ function std::stof to parse each number, which stops when it reaches any character that can't be parsed into the number. The control characters only ever cut off zeros in the decimals, so there is no impact to gameplay in this case. As far as StepMania is concerned, there's nothing wrong with the file.
TimingData, on the other hand, throws an exception when presented with this simfile. This is because Python's Decimal class constructor expects the incoming string data to be clean. We should change our behavior to match StepMania to support this and similar files.
For example, OceanLab Megamix contains spurious control characters in some BPM values. StepMania appears to use the C++ function
std::stof
to parse each number, which stops when it reaches any character that can't be parsed into the number. The control characters only ever cut off zeros in the decimals, so there is no impact to gameplay in this case. As far as StepMania is concerned, there's nothing wrong with the file.TimingData
, on the other hand, throws an exception when presented with this simfile. This is because Python'sDecimal
class constructor expects the incoming string data to be clean. We should change our behavior to match StepMania to support this and similar files.