mirror of
git://jb55.com/damus
synced 2024-10-04 19:00:42 +00:00
nostrdb/filter: make sure we only match single chars
Without this, we could accidently match `pr` for `#p` filters Fixes: 30ed801285dd ("filters: add initial filter interface") Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
parent
466dfcb7d7
commit
4109649dc2
@ -425,7 +425,7 @@ static int ndb_generic_filter_matches(struct ndb_filter_elements *els,
|
||||
continue;
|
||||
|
||||
// do we have #e matching e (or p, etc)
|
||||
if (str.str[0] != els->field.generic)
|
||||
if (str.str[0] != els->field.generic || str.str[1] != 0)
|
||||
continue;
|
||||
|
||||
str = ndb_note_str(note, &it->tag->strs[1]);
|
||||
|
Loading…
Reference in New Issue
Block a user