xwayland: Use the right length for iterating through the formats array
Spotted by Tiago Vignatti, minimal fix to just use the right length.
This commit is contained in:
@@ -1065,7 +1065,7 @@ wxs_wm_get_resources(struct weston_wm *wm)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
formats = xcb_render_query_pict_formats_formats(formats_reply);
|
formats = xcb_render_query_pict_formats_formats(formats_reply);
|
||||||
for (i = 0; i < formats_reply->length; i++)
|
for (i = 0; i < formats_reply->num_formats; i++)
|
||||||
if (formats[i].type == XCB_RENDER_PICT_TYPE_DIRECT &&
|
if (formats[i].type == XCB_RENDER_PICT_TYPE_DIRECT &&
|
||||||
formats[i].depth == 24)
|
formats[i].depth == 24)
|
||||||
wm->render_format = formats[i];
|
wm->render_format = formats[i];
|
||||||
|
|||||||
Reference in New Issue
Block a user