From b57f3edc3ce07c922f5555705ce6145ad801ed60 Mon Sep 17 00:00:00 2001 From: Brendan Shanks Date: Tue, 28 Feb 2017 11:23:46 -0800 Subject: [PATCH] Fix string comparison in object type filter The object type filter used strncmp() to compare object type names, but limited the comparison to the length of the filter string. For example, a filter of 'GstPad' would display both 'GstPad' and 'GstPadTemplate' types. Use g_strcmp0() instead, it uses the entirety of both strings when comparing. --- gobject-list.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gobject-list.c b/gobject-list.c index 891a1ce..edab341 100644 --- a/gobject-list.c +++ b/gobject-list.c @@ -143,7 +143,7 @@ object_filter (const char *obj_name) if (filter == NULL) return TRUE; else - return (strncmp (filter, obj_name, strlen (filter)) == 0); + return (g_strcmp0 (filter, obj_name) == 0); } static void