Skip to content

Commit

Permalink
filevercmp: Fix 0 padded versions compare
Browse files Browse the repository at this point in the history
  • Loading branch information
matan1008 committed Apr 22, 2023
1 parent 39b7c9a commit e25d83a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pygnuutils/filevercmp.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ def verrevcmp(s1: str, s2: str):
return s1_c - s2_c
s1 = s1[1:]
s2 = s2[1:]
s1.lstrip('0')
s2.lstrip('0')
s1 = s1.lstrip('0')
s2 = s2.lstrip('0')
while (s1 and s1[0].isdigit()) and (s2 and s2[0].isdigit()):
if not first_diff:
first_diff = ord(s1[0]) - ord(s2[0])
Expand Down

0 comments on commit e25d83a

Please sign in to comment.