Message226303
int x = PyOS_mystricmp("foo", "none");
expected: x < 0
actual: x == 0
while (*s1 && (tolower((unsigned)*s1++) == tolower((unsigned)*s2++))) {
;
}
return (tolower((unsigned)*s1) - tolower((unsigned)*s2));
The while-loop is finished when *s1 != *s2 (ex. *s1 == 'f', *s2 == 'n'), but s1 and s2 already point to next characters (ex. *s1 == 'o', *s2 == 'o'), so PyOS_mystricmp returns difference between these characters. |
|
Date |
User |
Action |
Args |
2014-09-03 09:04:29 | kakkoko | set | recipients:
+ kakkoko |
2014-09-03 09:04:29 | kakkoko | set | messageid: <1409735069.35.0.121112016094.issue22330@psf.upfronthosting.co.za> |
2014-09-03 09:04:29 | kakkoko | link | issue22330 messages |
2014-09-03 09:04:29 | kakkoko | create | |
|