mirror of
git://sourceware.org/git/libabigail.git
synced 2024-12-24 02:32:16 +00:00
Make string_ends_with() allow long suffixes
Make string_ends_with() allow suffixes that are as long as the string we are looking at. * src/abg-tools-utils.cc (string_ends_with): Allow suffixes of the same size as the input string. Signed-off-by: Dodji Seketeli <dodji@redhat.com>
This commit is contained in:
parent
e15a2d9e83
commit
5bff31d2d1
@ -324,7 +324,7 @@ check_file(const string& path,
|
||||
bool
|
||||
string_ends_with(const string& str, const string& suffix)
|
||||
{
|
||||
if (str.length() <= suffix.length())
|
||||
if (str.length() < suffix.length())
|
||||
return false;
|
||||
return str.compare(str.length() - suffix.length(),
|
||||
suffix.length(),
|
||||
|
Loading…
Reference in New Issue
Block a user