Skip to content

Ksh allows variables to contain negative 0 (-0) which breaks equality #74

@laurenthuberdeau

Description

@laurenthuberdeau

Because we use =/!= instead of -eq/-ne to compare numbers in conditions, having variables containing -0 breaks this optimization and causes conditions to misfire. The bug doesn't happen when using the variable containing -0 in an arithmetic expansion since -0 is reduced to 0, so it only happens in conditions

See #73 for instructions on how to reproduce the bug.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions