When calculating `end_time`, explicitly cast `idle_time_limit` to 32 bits, otherwise the `idle_time_limit * 1000` operation will be done on 16 bits, which would overflow at about 65 seconds. With the cast, the operation will use all 32 bits, and we avoid the overflow. Many thanks to @nevd for the report and the help in debugging & testing the fix. Signed-off-by: Gergely Nagy <algernon@keyboard.io>pull/445/head
parent
300e1afacb
commit
31d64a2f3d
Loading…
Reference in new issue