and make it work

This commit is contained in:
Glenn Maynard
2003-02-15 00:30:14 +00:00
parent a34dd244b5
commit b51773e21a
+3 -4
View File
@@ -820,13 +820,12 @@ CString WcharToUTF8( wchar_t c )
/* XXX autoconf this */ /* XXX autoconf this */
int memicmp(const char *s1, const char *s2, size_t n) int memicmp(const char *s1, const char *s2, size_t n)
{ {
while(n) for(size_t i = 0; i < n; ++i)
{ {
char c1 = tolower(*s1); char c1 = tolower(s1[i]);
char c2 = tolower(*s2); char c2 = tolower(s2[i]);
if(c1 < c2) return -1; if(c1 < c2) return -1;
if(c1 > c2) return 1; if(c1 > c2) return 1;
s1++; s2++;
} }
return 0; return 0;
} }