mirror of
https://github.com/cryb-to/cryb-to.git
synced 2024-12-21 20:11:08 +00:00
Fix string_equal() for strings of unequal length.
This commit is contained in:
parent
2ad45cfccf
commit
79967f2844
1 changed files with 1 additions and 1 deletions
|
@ -309,5 +309,5 @@ string_equal(const string *s1, const string *s2)
|
|||
for (p1 = s1->buf, p2 = s2->buf; *p1 && *p2; ++p1, ++p2)
|
||||
if (*p1 != *p2)
|
||||
return (0);
|
||||
return (1);
|
||||
return (*p1 || *p2 ? 0 : 1);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue