The main issue with the existing logic is that we're comparing versions as integers, which isn't an accurate way to do version comparison. The reason is that version numbers are not integers; they're a series of integers. If version numbers were just integers, version 1.11 would be less than version 2.0 and also version 1.2. But it's not, because the 11 in 1.11 is not a single digit but two digits.
example:
curl 8.0.1 will be less than 7.55.0 because the comparison is:
if 801 < 7550
The main issue with the existing logic is that we're comparing versions as integers, which isn't an accurate way to do version comparison. The reason is that version numbers are not integers; they're a series of integers. If version numbers were just integers, version 1.11 would be less than version 2.0 and also version 1.2. But it's not, because the 11 in 1.11 is not a single digit but two digits.
example: