Closed
Bug 304191
Opened 19 years ago
Closed 19 years ago
nsIVersionComparator can return 0 when versions are different
Categories
(Core :: XPCOM, defect)
Core
XPCOM
Tracking
()
RESOLVED
FIXED
mozilla1.8beta4
People
(Reporter: mossop, Assigned: mossop)
Details
Attachments
(1 file)
875 bytes,
patch
|
benjamin
:
review+
shaver
:
superreview+
benjamin
:
approval1.8b4+
|
Details | Diff | Splinter Review |
In certain situations the version comparator returns that the versions are equal when they actually aren't. The following are the current results: compare("1.2","1.2.2") returns 0 compare("1.2","1.2.0.2") returns 0 compare("1.2","1.2.1.2") returns -1 compare("1.2","1.2.1") returns 0 I have what I think is a working patch to attach in a moment.
Assignee | ||
Comment 1•19 years ago
|
||
OnlyZeros currently ignores the last version part since ParseVP returns false when it parses the last version part. Changing from a while to a do - while solves this.
Attachment #192248 -
Flags: review?(benjamin)
Comment 2•19 years ago
|
||
Comment on attachment 192248 [details] [diff] [review] Check all remaining version parts Wow, good catch. I will add this to the unit test as well.
Attachment #192248 -
Flags: superreview?(shaver)
Attachment #192248 -
Flags: review?(benjamin)
Attachment #192248 -
Flags: review+
Comment on attachment 192248 [details] [diff] [review] Check all remaining version parts sr=shaver
Attachment #192248 -
Flags: superreview?(shaver) → superreview+
Assignee | ||
Comment 4•19 years ago
|
||
Comment on attachment 192248 [details] [diff] [review] Check all remaining version parts Could hopefully get this in before the branch. It's a quick fix and I can't see any way it could break anything.
Attachment #192248 -
Flags: approval1.8b4?
Assignee | ||
Updated•19 years ago
|
Status: NEW → ASSIGNED
OS: Windows XP → All
Assignee | ||
Comment 5•19 years ago
|
||
Should have assigned to myself, apologies for the spam
Assignee: dougt → mossop
Status: ASSIGNED → NEW
Assignee | ||
Updated•19 years ago
|
Status: NEW → ASSIGNED
Comment 6•19 years ago
|
||
Fixed on trunk for 1.8b4, with extra comparisons in the unit test.
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.8beta4
Comment 7•19 years ago
|
||
Comment on attachment 192248 [details] [diff] [review] Check all remaining version parts oh yeah, a=me
Attachment #192248 -
Flags: approval1.8b4? → approval1.8b4+
You need to log in
before you can comment on or make changes to this bug.
Description
•