projects
/
webmin.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d66c41b
)
Version 1 is higher than version fc5.
author
Jamie Cameron
<jcameron@webmin.com>
Thu, 4 Nov 2010 04:21:12 +0000
(21:21 -0700)
committer
Jamie Cameron
<jcameron@webmin.com>
Thu, 4 Nov 2010 04:21:12 +0000
(21:21 -0700)
software/software-lib.pl
patch
|
blob
|
history
diff --git
a/software/software-lib.pl
b/software/software-lib.pl
index
1b15e2f
..
949712a
100755
(executable)
--- a/
software/software-lib.pl
+++ b/
software/software-lib.pl
@@
-231,6
+231,14
@@
for(my $i=0; $i<@sp1 || $i<@sp2; $i++) {
}
}
}
+ elsif ($v1 =~ /^\d+$/ && $v2 !~ /^\d+$/) {
+ # Numeric compared to non-numeric - numeric is always higher
+ $comp = 1;
+ }
+ elsif ($v1 =~ /^\d+$/ && $v2 !~ /^\d+$/) {
+ # Non-numeric compared to numeric - numeric is always higher
+ $comp = -1;
+ }
else {
# String compare only
$comp = $v1 cmp $v2;