IntergatedCircuits / HidSharp

HIDSharp is a multiplatform C# library for USB HID devices by James F. Bellinger
https://www.zer7.com/software/hidsharp
Other
121 stars 34 forks source link

Maybe there is one typo error #13

Closed andy74911 closed 2 years ago

andy74911 commented 2 years ago

HidSharp/Reports/ReportDescriptor.cs seams there is one typo @ Line170 I think currect one seams State.GlobalItemStateStack.RemoveAt(State.GlobalItemStateStack.Count - 1);

Please check it, thanks.

benedekkupper commented 2 years ago

Hi! Thanks for your report. Please try to use github's functionality to link to a specific line of code, e.g. like this: https://github.com/IntergatedCircuits/HidSharp/blob/e8359220e0cdb1541844835055f5f19af02a9f4c/HidSharp/Reports/ReportDescriptor.cs#L170

So what is in your opinion wrong in this line, and what is your assumption about the correction for it?

andy74911 commented 2 years ago

Thanks for your advice. I think correct one is State.GlobalItemState.Count => State.GlobalItemStateStack.Count

benedekkupper commented 2 years ago

Indeed, that's a coding error right there, thanks for spotting it!

benedekkupper commented 2 years ago

@andy74911 Please verify that my new commit c6e9365 solves the problem.

andy74911 commented 2 years ago

I had tried it and original fail case is working now. Thanks. By the way,can I ask when will it publish this version on NuGet.

benedekkupper commented 2 years ago

Thanks for the verification! Unfortunately this repo is a fork of the original library, and I have no contact with the original author (who owns the nuget package), so I cannot give you any ETA for this fix.