We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f671387 commit 96b68feCopy full SHA for 96b68fe
src/platform/Darwin/UserDefaults.mm
@@ -27,7 +27,7 @@ uint16_t getUserDefaultDnssdSRPTimeoutInMSecs()
27
{
28
NSUserDefaults * defaults = [[NSUserDefaults alloc] initWithSuiteName:kUserDefaultDomain];
29
NSInteger srpTimeoutValue = [defaults integerForKey:kSRPTimeoutInMsecsUserDefaultKey];
30
- return (srpTimeoutValue < UINT16_MAX) ? static_cast<uint16_t>(srpTimeoutValue) : 0;
+ return (srpTimeoutValue > 0 && srpTimeoutValue < UINT16_MAX) ? static_cast<uint16_t>(srpTimeoutValue) : 0;
31
}
32
33
} // namespace DeviceLayer
0 commit comments