Commit e2d3860b authored by Michael Tremer's avatar Michael Tremer
Browse files

Fix searching with an empty string

Signed-off-by: default avatarMichael Tremer <michael.tremer@ipfire.org>
parent 83d61c46
......@@ -135,6 +135,10 @@ int loc_as_to_database_v0(struct loc_as* as, struct loc_stringpool* pool,
}
int loc_as_match_string(struct loc_as* as, const char* string) {
// Match all AS when no search string is set
if (!string)
return 1;
// Search if string is in name
if (strcasestr(as->name, string) != NULL)
return 1;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment