aboutsummaryrefslogtreecommitdiffstats
path: root/src/locate.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/locate.c')
-rw-r--r--src/locate.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/locate.c b/src/locate.c
index 175bca35a..7bc23db16 100644
--- a/src/locate.c
+++ b/src/locate.c
@@ -17,6 +17,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
+#include "config.h"
#include "locate.h"
#include "path.h"
#include "tag.h"
@@ -42,9 +43,9 @@ locate_parse_type(const char *str)
if (0 == g_ascii_strcasecmp(str, LOCATE_TAG_ANY_KEY))
return LOCATE_TAG_ANY_TYPE;
- for (i = 0; i < TAG_NUM_OF_ITEM_TYPES; i++)
- if (0 == g_ascii_strcasecmp(str, tag_item_names[i]))
- return i;
+ i = tag_name_parse_i(str);
+ if (i != TAG_NUM_OF_ITEM_TYPES)
+ return i;
return -1;
}