-
- Downloads
LinuxVersion: fix compare of versions with not the same amount of parts
LinuxVersion::compare reported two versions as equal if it could find a new '.' in the first version but not in the second. But this is clearly wrong because it skips comparision of the valid last part. The comparision 5.16.12 >= 5.18 returned true because compare reported the version as equal after comparing the first parts and finding a second '.' in the first but not the second. Fix this behavior by marking the current position as the last but do not skip its comparision. Add tests for the desired behaviour.
Loading
Please register or sign in to comment