зеркало из https://github.com/mozilla/pjs.git
Bug 310976 - Treat 1.5.* as 1.5.infinity r=darin
This commit is contained in:
Родитель
2e9fbbde13
Коммит
e59ea0da5c
|
@ -45,6 +45,9 @@
|
|||
*
|
||||
* <number-a><string-b><number-c><string-d (everything else)>
|
||||
*
|
||||
* A version-part may also consist of a single asterisk "*" which indicates
|
||||
* "infinity".
|
||||
*
|
||||
* Numbers are base-10, and are zero if left out.
|
||||
* Strings are compared bytewise.
|
||||
*
|
||||
|
|
|
@ -74,7 +74,13 @@ ParseVP(char *part, VersionPart &result)
|
|||
if (dot)
|
||||
*dot = '\0';
|
||||
|
||||
result.numA = strtol(part, NS_CONST_CAST(char**, &result.strB), 10);
|
||||
if (part[0] == '*' && part[1] == '\0') {
|
||||
result.numA = PR_INT32_MAX;
|
||||
result.strB = "";
|
||||
}
|
||||
else {
|
||||
result.numA = strtol(part, NS_CONST_CAST(char**, &result.strB), 10);
|
||||
}
|
||||
|
||||
if (!*result.strB) {
|
||||
result.strB = nsnull;
|
||||
|
|
|
@ -52,6 +52,8 @@ my $executable = shift;
|
|||
"1.1",
|
||||
"1.1.0.1",
|
||||
"1.1.1",
|
||||
"1.1.*",
|
||||
"1.*",
|
||||
"2.0",
|
||||
"2.1",
|
||||
"3.0.-1",
|
||||
|
|
Загрузка…
Ссылка в новой задаче