Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix string comparison in object type filter #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bshankstd
Copy link

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.

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.
@danni
Copy link
Owner

danni commented Mar 1, 2017

Hi @bshankstd, that was intentional to be able to match all objects of a given group. There's a TODO written somewhere to replace the filter with a globbing function or regular expression, that I never got around to implementing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants