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

Wrong use of strcmp? #6

Open
m-vz opened this issue May 12, 2017 · 1 comment
Open

Wrong use of strcmp? #6

m-vz opened this issue May 12, 2017 · 1 comment

Comments

@m-vz
Copy link

m-vz commented May 12, 2017

Either I have completely misread your code, or vkel is (as useful as it is - thanks!) completely unusable in its current state:

As I see, in your code you use strcmp for the vkelIs[Whatever]Supported() methods, but you use it like so:

if (vkel_strcmp(extensionNames[extensionNameIndex], pExtensionName))

This always returns the opposite of what you want. strcmp returns 0 if the strings are equal and something else if they are not, this means you enter the if block (with anything other than 0) if the strings are not equal and you don't enter it if they are (if(0) doesn't enter!).

if (vkel_strcmp(extensionNames[extensionNameIndex], pExtensionName) == 0)

is what you want to use to get the correct behaviour.

@char8t
Copy link

char8t commented May 12, 2017

I can confirm that my code is working with the modified call to vkel_strcmp. You may create a pull request for this.

@m-vz m-vz mentioned this issue May 13, 2017
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

2 participants