From e6d8d2f62aa560035bfe86f35f79c2dbeb35f208 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= Date: Mon, 16 Jul 2012 11:52:40 -0400 Subject: [PATCH] xwayland: Use the right length for iterating through the formats array Spotted by Tiago Vignatti, minimal fix to just use the right length. --- src/xwayland/window-manager.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xwayland/window-manager.c b/src/xwayland/window-manager.c index 6e032eab..1ec6a8be 100644 --- a/src/xwayland/window-manager.c +++ b/src/xwayland/window-manager.c @@ -1065,7 +1065,7 @@ wxs_wm_get_resources(struct weston_wm *wm) return; 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 && formats[i].depth == 24) wm->render_format = formats[i];