bugDotGNU Portable.NET - Bugs: bug #7014, String.Compare() returns the wrong...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #7014: String.Compare() returns the wrong values when comparing n and N

Submitter:  -Deleted Account- <scandium>
Submitted:  Mon 29 Dec 2003 05:00:40 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Closed

Mon 22 Nov 2004 02:22:46 PM UTC, comment #2: 

fixed in cvs 11/22/2004

Klaus Treichel <ktreichel>
Group administrator
Sun 21 Nov 2004 02:26:35 PM UTC, comment #1: 

Added a patch to fix this Bug (and the same one in String.Compare(Sring, String)).

Klaus Treichel <ktreichel>
Group administrator
Mon 29 Dec 2003 05:00:40 PM UTC, original submission:  

When running the attached test case pnet returns
-1
0
0
-1
but MS .NET returns (as expected)
1
0
0
1

It seems like if pnet compares the same characters but one is capitalized and one isn't, it returns the wrong value.
e.g. if I am not mistaken in .NET it's supposed to be
c > a
C > a
N > n

pnet seems to interpret the last one the other way around (n > N)

-Deleted Account- <scandium>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #2038:  kt-041121.patch added by ktreichel (8KiB - text/x-patch - Throw the previous one in the bin. This one is more complete (Missed _IL_String_Compare).)
file #2037:  kt-041121.patch added by ktreichel (7KiB - text/x-patch - patch that fixes this bug)
file #934:  compare.cs added by scandium (458B - application/octet-stream - String.Compare() test case)

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

 

Follow 5 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2004-12-14 ktreichel Open/ClosedOpen Closed
2004-11-22 ktreichel StatusNone Fixed
2004-11-21 ktreichel Attached File- Added kt-041121.patch, #1900
2004-11-21 ktreichel Attached File- Added kt-041121.patch, #1899
2003-12-29 scandium Attached File- Added compare.cs, #914

Back to the top

Powered by Savane 3.13-caa5.
Corresponding source code