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

On Ubuntu 22.04 64bit WideStringBuffer is not applicable for hid_error #149

Open
laborg opened this issue May 3, 2024 · 0 comments
Open
Assignees

Comments

@laborg
Copy link

laborg commented May 3, 2024

While investigating #148 I found out that the following code doesn't work for hid_error() (spacing should be four bytes instead of two):

for (int i = 0; i < buffer.length && buffer[i] != 0; i += 2)

System:

... (master*) » lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 22.04.4 LTS
Release:	22.04
Codename:	jammy

... (master*) » uname -a
Linux e15 5.19.0-50-generic #50-Ubuntu SMP PREEMPT_DYNAMIC Mon Jul 10 18:24:29 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

In linux/hidapi.c the returned string is created with L"Success" which apparently uses a different encoding as all the other string IO calls (e.g. get_serial_number(...)) .

@laborg laborg changed the title On Ubuntu 22.04 64bit WideStringBuffer works on wrong assumption On Ubuntu 22.04 64bit WideStringBuffer is not applicable for hid_error May 3, 2024
@gary-rowe gary-rowe self-assigned this May 3, 2024
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