Skip to content

Remove binary compare in parameterizedFeedURL method #278

Description

@psychicpuppy

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions