Skip to content

Fix off-by-one in ioctl_EVIOCG_bits - #131

Merged
gvalkov merged 1 commit into
gvalkov:masterfrom
sbtinstruments:fix-off-by-one
Aug 19, 2020
Merged

Fix off-by-one in ioctl_EVIOCG_bits#131
gvalkov merged 1 commit into
gvalkov:masterfrom
sbtinstruments:fix-off-by-one

Conversation

@frederikaalund

Copy link
Copy Markdown
Contributor

This bug caused values at the end of the list to not be reported back.

Example: On my system, SW_PEN_INSERTED (0x0f) is the last switch constant. That is,
SW_MAX=SW_PEN_INSERTED. Other tools (python-libevdev) correctly reported this switch
as 'set' but python-evdev did not. This commit fixes this issue.

This bug caused values at the end of the list to not be reported back.

Example: On my system, SW_PEN_INSERTED (0x0f) is the last switch constant. That is,
SW_MAX=SW_PEN_INSERTED. Other tools (python-libevdev) correctly reported this switch
as 'set' but python-evdev did not. This commit fixes this issue.
@gvalkov
gvalkov merged commit 9aead89 into gvalkov:master Aug 19, 2020
@gvalkov

gvalkov commented Aug 19, 2020

Copy link
Copy Markdown
Owner

Thanks for the fix.

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

Successfully merging this pull request may close these issues.

2 participants