foucault / nvfancontrol

NVidia dynamic fan control for Linux and Windows
GNU General Public License v3.0
206 stars 20 forks source link

Fix parsing error when driver version contains more than one dot. #18

Closed openglfreak closed 4 years ago

openglfreak commented 4 years ago

The Nvidia Vulkan beta drivers have more than two groups of digits. This PR fixes parsing errors with these driver versions by discarding the second dot and everything after when detecting the version, and just using it verbatim instead of parsing it when logging the version.

foucault commented 4 years ago

Thanks. That's a proper bug alright but pulling a whole new crate to parse a string with two dots it's a bit too much. The standard library has facilities to deal with that. It's probably easier to search for number of dots and work from there. I can fix it on my own but if you want to work on it it's fine by me :-)

openglfreak commented 4 years ago

I have no idea how Rust works, I just hacked this together to make nvfancontrol work for me. So since you know Rust I think you should fix this (if you want to and have time).