revert to strlen in edit_find_filter

This commit is contained in:
Ilia Maslakov 2009-04-06 12:45:35 +00:00
parent bfa9c961ca
commit f845e4b569

View File

@ -195,9 +195,9 @@ static int edit_find_filter (const char *filename)
size_t i, l, e;
if (!filename)
return -1;
l = str_term_width1 (filename);
l = strlen (filename);
for (i = 0; i < sizeof (all_filters) / sizeof (all_filters[0]); i++) {
e = (all_filters[i].extension);
e = strlen (all_filters[i].extension);
if (l > e)
if (!strcmp (all_filters[i].extension, filename + l - e))
return i;