You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is always NO for me even when sendingSystemProfile is YES and lastSubmitDate is distandPast. Turns out the problem is the binary compare &=. If I break out the compare against oneWeek into a separate BOOL say:
I have not reproduced this issue however it wouldn't hurt to update this for clarity.
zorgiepoo
changed the title
Binary compare failing in SUUpdater parameterizedFeedURL method
Remove binary compare in parameterizedFeedURL method
Dec 26, 2022
This line of code in parameterizedFeedURL fails for me (line 4800;
sendingSystemProfile &= (-[lastSubmitDate timeIntervalSincenow] >= oneWeek);
This is always NO for me even when sendingSystemProfile is YES and lastSubmitDate is distandPast. Turns out the problem is the binary compare &=. If I break out the compare against oneWeek into a separate BOOL say:
BOOL timeLapsed = (-[lastSubmitDate timeIntervalSincenow] >= oneWeek);
and then change the logic to be:
sendSystemProfile = sendSystemProfile && timeLapsed;
it works ok. I've had this issue before in C code where the binary compare is not reliable. You need to use the Boolean compare.
The text was updated successfully, but these errors were encountered: