mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-17 23:24:51 +00:00
loginManager: fix versionCompare function
It's important to compare the version components as integers, not strings, so "10" evaulates as greater than "5" This fixes the login screen in gnome 3.10. https://bugzilla.gnome.org/show_bug.cgi?id=708691
This commit is contained in:
parent
3e99eb10d1
commit
609a31ea46
1 changed files with 4 additions and 2 deletions
|
|
@ -72,8 +72,10 @@ function versionCompare(required, reference) {
|
|||
reference = reference.split('.');
|
||||
|
||||
for (let i = 0; i < required.length; i++) {
|
||||
if (required[i] != reference[i])
|
||||
return required[i] < reference[i];
|
||||
let requiredInt = parseInt(required[i]);
|
||||
let referenceInt = parseInt(reference[i]);
|
||||
if (requiredInt != referenceInt)
|
||||
return requiredInt < referenceInt;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue