autoupdater: consider end of string smaller than all characters except for '~'
This fixes ordering for the following patterns: * 1.0 < 1.0a * 1.0a < 1.0ab * 1.0a < 1.0a1 Note that trailing zeros are still ignored (1.0 == 1., 1test0 == 1test), which matches the behaviour of dpkg and opkg.
This commit is contained in:
parent
688051cb21
commit
30be52e03b
|
@ -34,8 +34,10 @@ static int char_order(char c) {
|
|||
return 0;
|
||||
else if (isalpha(c))
|
||||
return c;
|
||||
else if (c == '~')
|
||||
else if (c == '\0')
|
||||
return -1;
|
||||
else if (c == '~')
|
||||
return -2;
|
||||
else
|
||||
return c + 256;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue