Closed Bug 305992 Opened 19 years ago Closed 19 years ago

nsIVersionComparator is broken in some circumstances

Categories

(Core :: XPCOM, defect)

defect
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla1.8beta4

People

(Reporter: mossop, Assigned: mossop)

Details

(Keywords: regression, verified1.8)

Attachments

(1 file)

Seems since the last patch for bug 300731 the version comparator is broken.

compare("0.7","0.7.3") returns 1 (should be -1)
compare("0.7.2","0.7.3") returns -1

Also can we please clean up the confusing comment in nsIVersionComparator.idl
Flags: blocking1.9a1?
Flags: blocking1.8b4?
Just testing a patch for this.
Status: NEW → ASSIGNED
In the case of an empty string, numA of the version part was not being
initialised.
Also included the change to the comment in nsIVersionComparator.idl.
Attachment #193873 - Flags: superreview?(shaver)
Attachment #193873 - Flags: review?(benjamin)
My apologies. I wrote the previous patch, and I did test it, but I guess my
debug build zeroed out the struct for me. Anyway, for what it matters, this is
the correct fix. I'd give you the r and a if I could. Sorry for the trouble.
Mistakenly assigned to the wrong person again, sorry.
Assignee: dougt → mossop
Status: ASSIGNED → NEW
Status: NEW → ASSIGNED
Attachment #193873 - Flags: review?(benjamin) → review+
Flags: blocking1.9a1?
Flags: blocking1.8b4rc?
Flags: blocking1.8b4?
Flags: blocking1.8b4+
Comment on attachment 193873 [details] [diff] [review]
Initialises version part properly when the string is empty

sr+a=shaver
Attachment #193873 - Flags: superreview?(shaver)
Attachment #193873 - Flags: superreview+
Attachment #193873 - Flags: approval1.8b4+
fixed, trunk and 1.8branch
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Flags: blocking1.8b4rc?
Keywords: fixed1.8
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.8beta4
Status: RESOLVED → VERIFIED
Keywords: fixed1.8verified1.8
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: