Crash on invalid song duration
I'm getting the following panic on invalid song duration:
thread 'main' panicked at 'invalid time', /run/build/shortwave/_flatpak_build/target/cargo-home/registry/src/github.com-1285ae84e5963aae/chrono-0.4.13/src/naive/time.rs:409:67
The chrono doc does mention that
from_num_seconds_from_midnight "panics on invalid number of seconds and/or nanosecond.". I'm guessing negative numbers are invalid, but not sure how we end up with a negative number with unsigned integers. Maybe the
seconds as u32 type cast is doing something funky? Or
0 is an invalid number?. The seconds to be converted is logged just before the operation, but unfortunately I cannot reproduce easily and I'm having a hard time obtaining the logs of the flatpak app when launched by LXDE.