From b51773e21a73ce4cfd5f17573b5827d1afc2eb11 Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Sat, 15 Feb 2003 00:30:14 +0000 Subject: [PATCH] and make it work --- stepmania/src/RageUtil.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/stepmania/src/RageUtil.cpp b/stepmania/src/RageUtil.cpp index a1a18a5c2d..a22bd4631d 100644 --- a/stepmania/src/RageUtil.cpp +++ b/stepmania/src/RageUtil.cpp @@ -820,13 +820,12 @@ CString WcharToUTF8( wchar_t c ) /* XXX autoconf this */ 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 c2 = tolower(*s2); + char c1 = tolower(s1[i]); + char c2 = tolower(s2[i]); if(c1 < c2) return -1; if(c1 > c2) return 1; - s1++; s2++; } return 0; }