mirror of
https://github.com/rkd77/elinks.git
synced 2025-02-02 15:09:23 -05:00
bug 153, 1066: Fix search in bookmark manager.
test_search() was supposed to compare bookmark titles with strcasestr(), but in commit 311d95358de258656a0c7145a2dcff943fcdcd4b "bug 153, 1066: Convert bookmarks to/from UTF-8 when searching." on 2009-02-08, I inadvertently changed that to strcasecmp(), even while adding a comment about why strcasestr() is needed. strcasestr() returns non-NULL if the strings match, and strcasecmp() returns nonzero if they differ, so the search didn't work at all.
This commit is contained in:
parent
d65f41faab
commit
8ad32809e1
@ -687,8 +687,8 @@ test_search(struct listbox_item *item, void *data_, int *offset)
|
||||
}
|
||||
|
||||
if (title) {
|
||||
ctx->found = strcasecmp(title,
|
||||
ctx->title);
|
||||
ctx->found = (strcasestr(title, ctx->title)
|
||||
!= NULL);
|
||||
mem_free(title);
|
||||
}
|
||||
/** @todo Tell the user that the string could
|
||||
|
Loading…
x
Reference in New Issue
Block a user