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

Potentially questionable value for numStart? #9

Open
FrankDMartinez opened this issue Jul 30, 2012 · 1 comment
Open

Potentially questionable value for numStart? #9

FrankDMartinez opened this issue Jul 30, 2012 · 1 comment

Comments

@FrankDMartinez
Copy link

Hi,
Presuming keysToInclude does not contain '1', the call to strchr() in initKeyboardData() will be NULL. Subtracting from this result can result in undefined/unspecified behavior, according to the ISO C standard. In the event this occurs, what would You suggest is a suitable default value for numStart? 0, perhaps?

@michaeldickens
Copy link
Owner

The default value for numStart should be -1, to indicate that '1' was
not found.

On 7/30/12 12:31 PM, FrankDMartinez wrote:

Hi,
Presuming keysToInclude does not contain '1', the call to strchr() in initKeyboardData() will be NULL. Subtracting from this result can result in undefined/unspecified behavior, according to the ISO C standard. In the event this occurs, what would You suggest is a suitable default value for numStart? 0, perhaps?


Reply to this email directly or view it on GitHub:
#9

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