RENDER: Fix check for convolution filter
The X11 server's answer is not \0-terminated, so xcb_str_name() also does not provide a \0-terminated pointer. Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
parent
539d62ca93
commit
7719dc7325
|
@ -4740,7 +4740,8 @@ init_filters(session_t *ps) {
|
|||
xcb_str_iterator_t iter = xcb_render_query_filters_filters_iterator(pf);
|
||||
for (; iter.rem; xcb_str_next(&iter)) {
|
||||
// Convolution filter
|
||||
if (!strcmp(xcb_str_name(iter.data), XRFILTER_CONVOLUTION))
|
||||
if (strlen(XRFILTER_CONVOLUTION) == xcb_str_name_length(iter.data)
|
||||
&& !memcmp(XRFILTER_CONVOLUTION, xcb_str_name(iter.data), strlen(XRFILTER_CONVOLUTION)))
|
||||
ps->xrfilter_convolution_exists = true;
|
||||
}
|
||||
free(pf);
|
||||
|
|
Loading…
Reference in New Issue