Fixed a bug with the two string equals functions
This commit is contained in:
parent
c8ae7a57d1
commit
5e00c669c6
|
@ -12,7 +12,10 @@ bool_t rr_strings_equal(const char *string1, const char *string2)
|
|||
{
|
||||
usz_t index = 0;
|
||||
while(string1[index] == string2[index])
|
||||
{
|
||||
if(string1[index] == ZERO) return TRUE;
|
||||
++index;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -23,6 +26,7 @@ bool_t rr_strings_equal_up_to(const char *string1, const char *string2, usz_t ma
|
|||
{
|
||||
if(string1[index] == ZERO) return TRUE;
|
||||
if(index >= max_length) return TRUE;
|
||||
++index;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue