1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-11-04 08:17:17 -05:00

bug 153, 1066: Fix search in bookmark manager.

test_search() was supposed to compare bookmark titles with
strcasestr(), but in commit 311d95358d
"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:
Kalle Olavi Niemitalo 2009-03-01 09:21:29 +02:00 committed by Kalle Olavi Niemitalo
parent d65f41faab
commit 8ad32809e1

View File

@ -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