Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible issue with compilerkit_character_class_new #90

Open
mueschm opened this issue Jul 22, 2012 · 0 comments
Open

Possible issue with compilerkit_character_class_new #90

mueschm opened this issue Jul 22, 2012 · 0 comments

Comments

@mueschm
Copy link

mueschm commented Jul 22, 2012

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant