fix: nvm strcmp should crash on NULL, color cmd is now protected though

This commit is contained in:
2024-09-27 12:07:17 +02:00
parent f65d5ce418
commit ed11ec794a
2 changed files with 4 additions and 2 deletions

View File

@ -4,8 +4,6 @@ int strcmp(const char *s1, const char *s2)
{
size_t i = 0;
if (!s1 || !s2)
return -1;
while (s1[i] == s2[i] && s1[i] != '\0')
i++;
return s1[i] - s2[i];