mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 11:25:00 +00:00
Bug 310976 - Treat 1.5.* as 1.5.infinity r=darin
This commit is contained in:
parent
8b4f326fce
commit
e54a5866ab
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user