Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix int overflow for 0 deadline timers
Turns out, HAPPlatformTimerRegister may be invoked with deadline of 0 sometimes. This translates into a negative duration for mgos_set_timer, which is fine for the first 24.85 days but then duration rolls over and things go south. Instead, clamp negative duration to 0 while it's still a 64-bit int. apple/HomeKitADK#102 Fixes mongoose-os-apps/shelly-homekit#129
- Loading branch information