1
0
mirror of https://github.com/mist-devel/mist-firmware.git synced 2026-05-05 07:44:31 +00:00

strnicmp: don't compare the final \0

This commit is contained in:
Gyorgy Szombathelyi
2021-05-28 20:51:22 +02:00
parent b619b031b1
commit 8d60af5b46

View File

@@ -20,9 +20,10 @@ FAST int _strnicmp(const char *s1, const char *s2, size_t n)
{
c1 = *s1++;
c2 = *s2++;
if (!c1) break;
v = (unsigned int)tolower(c1) - (unsigned int)tolower(c2);
}
while (v == 0 && c1 != '\0' && --n > 0);
while (v == 0 && --n > 0);
return v;
}