Skip to content

Possible issue with compilerkit_character_class_new #90

@mueschm

Description

@mueschm

am unsure if this is an intended effect and possibly not just a wrong comment. I apologize for the terrible markdown. I have always been awful with markdown.

/* Don't match NULL in the regex */
if (lo == '\0')
{
lo++;
}

/* This must mean lo and hi are both NULL. Return EmptyString instead. */
else if (hi == '\0')
{
return compilerkit_empty_string_get_instance();
}

The second conditional will only be met when lo is not null. Though the comment says that in this case we are seeing if both hi and lo are null and if so return an empty set. It does not appear that will be the case though since if lo is null it will increment it by one and then move out of the conditional check without checking the state of hi.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions