]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Fix versioncmp
authorSimon Tatham <anakin@pobox.com>
Mon, 25 Oct 1999 14:27:13 +0000 (14:27 +0000)
committerSimon Tatham <anakin@pobox.com>
Mon, 25 Oct 1999 14:27:13 +0000 (14:27 +0000)
[originally from svn r255]

ssh.c

diff --git a/ssh.c b/ssh.c
index edac1822e803624635325b4840b74b780e0ac5e6..4100cc9a492a4db322deb7d2271e8b5f6560e3f5 100644 (file)
--- a/ssh.c
+++ b/ssh.c
@@ -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;
 }