In 5d11ec273c3d96bff6dd6fe0d732fd3add641f19, change of range checking to signed int causes comparison bug. When a format of characteristic is homekit_format_uint64, max_value is 4294967295 but it's now signed int that means the value is actually -1. And the checking of value range fails.
>>> HomeKit: [Client 57] Update Characteristics
!!! HomeKit: [Client 57] Failed to update 1.11: value 3 is not in range 0..-1
Ok, I've merged a better fix for range checking and overall more support for various int flavors. Please check it out and let me know if you will have any more issues with it.
In 5d11ec273c3d96bff6dd6fe0d732fd3add641f19, change of range checking to signed int causes comparison bug. When a format of characteristic is homekit_format_uint64,
max_value
is 4294967295 but it's now signed int that means the value is actually -1. And the checking of value range fails.So I fixed this using type-cast.