Commit 77b1b683 authored by claes's avatar claes

Bugfix in cdh_NoCaseStrcmp, space was handled as 0

parent fd54ffa6
......@@ -2441,7 +2441,9 @@ cdh_NoCaseStrcmp (
while (*s && *t && !(((*s) ^ (*t)) & ~(1<<5)))
s++, t++;
return ((*s) & ~(1<<5)) - ((*t) & ~(1<<5));
// return ((*s) & ~(1<<5)) - ((*t) & ~(1<<5));
return (isalpha(*s) ? ((*s) & ~(1<<5)) : *s) -
(isalpha(*t) ? ((*t) & ~(1<<5)) : *t);
}
//! Compare the n (at most) first charachters of two strings not regarding their casing.
......@@ -2471,7 +2473,9 @@ cdh_NoCaseStrncmp (
if ( n == i)
return 0;
return ((*s) & ~(1<<5)) - ((*t) & ~(1<<5));
// return ((*s) & ~(1<<5)) - ((*t) & ~(1<<5));
return (isalpha(*s) ? ((*s) & ~(1<<5)) : *s) -
(isalpha(*t) ? ((*t) & ~(1<<5)) : *t);
}
//! Convert operating system to string
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment