[Xcb-commit] xcb-util/convenient xcb_aux.c,1.1,1.2

Bart Massey xcb-commit at lists.freedesktop.org
Sun Dec 11 14:15:38 PST 2005


Update of /cvs/xcb/xcb-util/convenient
In directory gabe:/tmp/cvs-serv674/convenient

Modified Files:
	xcb_aux.c 
Log Message:
Wrong test in XCBAuxGetScreen() led to off-by-one.



Index: xcb_aux.c
===================================================================
RCS file: /cvs/xcb/xcb-util/convenient/xcb_aux.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- xcb_aux.c	2 Apr 2005 18:12:09 -0000	1.1
+++ xcb_aux.c	11 Dec 2005 22:15:36 -0000	1.2
@@ -39,7 +39,7 @@
   i = XCBConnSetupSuccessRepRootsIter(XCBGetSetup(c));
   if (screen > i.rem - 1) return NULL; /* screen must be */
                                        /* between 0 and i.rem - 1 */
-  for (cur = 0; cur <= screen; XCBSCREENNext(&i), ++cur) {}
+  for (cur = 0; cur < screen; XCBSCREENNext(&i), ++cur) {}
   
   return i.data;
 }



More information about the xcb-commit mailing list