fix glReadPixels parameters to handle odd-width windows correctly
diff --git a/progs/tests/drawbuffers.c b/progs/tests/drawbuffers.c
index d2e826f..5e89569 100644
--- a/progs/tests/drawbuffers.c
+++ b/progs/tests/drawbuffers.c
@@ -74,8 +74,9 @@
                 buffer);
    /* top half = colorbuffer 1 */
    glReadBuffer(GL_COLOR_ATTACHMENT1_EXT);
-   glReadPixels(0, Height/2, Width, Height / 2, GL_RGBA, GL_UNSIGNED_BYTE,
-                buffer + Width * Height / 2 * 4);
+   glReadPixels(0, Height/2, Width, Height - Height / 2,
+                GL_RGBA, GL_UNSIGNED_BYTE,
+                buffer + Width * (Height / 2) * 4);
 
    /* draw to window */
    glUseProgram_func(0);