Opened 15 years ago
Closed 13 years ago
#219 closed defect (fixed)
wcscmp() and wcsncmp() are broken
Reported by: | dmik | Owned by: | bird |
---|---|---|---|
Priority: | normal | Milestone: | libc-0.6.5 |
Component: | libc | Version: | 0.6 |
Severity: | normal | Keywords: | |
Cc: |
Description
wcscmp() and wcsncmp() assume that wchar_t is int while it seems to be short unsigned int by default (and may be made such with -fshort-wchar). This breaks the comparison results by usually negating them which greatly confuses applications.
Attached is a simple patch that casts wchar_t to int before getting the result of the comparison.
Attachments (1)
Change History (4)
by , 15 years ago
Attachment: | wcscmp.diff added |
---|
comment:1 by , 14 years ago
Milestone: | → libc-0.6.4 |
---|
comment:2 by , 14 years ago
Status: | new → assigned |
---|
comment:3 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Note:
See TracTickets
for help on using tickets.
Addressed in r3761 (branch) and r3762 (trunk).