| www.delorie.com/djgpp/bugs/show.cgi | search |
The source code for those two functions casts the pointer to
`const unsigned char' before subtracting. This causes the subtraction to be
done as unsigned, which always returns a positive result. Thus, if a negative
result should have been returned, like in stricmp("A", "b"), a large positive
result is returned instead.Cast the derefrenced pointers to an int before the subtraction.
| webmaster donations bookstore | delorie software privacy |
| Copyright © 2010 by DJ Delorie | Updated Jul 2010 |