Check if one string ended before the other

This commit is contained in:
2026-07-29 16:52:57 +02:00
parent a066a835c6
commit f456cfd21e

View File

@@ -124,6 +124,13 @@ RTL::String::CompareStringInsensitive(IN PCSTR String1,
Index++; Index++;
} }
/* Check if one string ended before the other */
if((Length == 0 || Index < Length) && (String1[Index] != String2[Index]))
{
/* Strings are not equal */
return String1[Index] > String2[Index] ? 1 : -1;
}
/* Strings are equal */ /* Strings are equal */
return 0; return 0;
} }