Skip to content

Overlap bug in struct closed_adjacent issue with unsigned indexes #48

@lailoken

Description

@lailoken

This code will not work due to the - 1 on l2 (which can be unsigned).
Possibly just + 1 on h1 rather?

        static inline bool overlaps(numerical_type l1, numerical_type h1, numerical_type l2, numerical_type h2)
        {
            return (l1 <= (h2 + 1)) && ((l2 - 1) <= h1);
        }

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions