1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-04-10 07:38:06 -05:00

Fix versioncmp

[originally from svn r255]
This commit is contained in:
Simon Tatham 1999-10-25 14:27:13 +00:00
parent 2d6fcb0a7a
commit 3992fc48f1

8
ssh.c
View File

@ -217,13 +217,13 @@ static int ssh_versioncmp(char *a, char *b) {
char *ae, *be;
unsigned long av, bv;
av = strtoul(a, &ae);
bv = strtoul(b, &be);
av = strtoul(a, &ae, 10);
bv = strtoul(b, &be, 10);
if (av != bv) return (av < bv ? -1 : +1);
if (*ae == '.') ae++;
if (*be == '.') be++;
av = strtoul(ae, &ae);
bv = strtoul(be, &be);
av = strtoul(ae, &ae, 10);
bv = strtoul(be, &be, 10);
if (av != bv) return (av < bv ? -1 : +1);
return 0;
}