[Piglit] [PATCH 1/2] gbm: Fix off by 1 error in libcaca image flop

Jordan Justen jordan.l.justen at intel.com
Mon Jan 5 08:41:47 PST 2015


Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
---
 %^$# @^&* %^$# !!!

 tests/util/piglit-framework-gl/piglit_gbm_framework.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/util/piglit-framework-gl/piglit_gbm_framework.c b/tests/util/piglit-framework-gl/piglit_gbm_framework.c
index de80b0d..8728f58 100644
--- a/tests/util/piglit-framework-gl/piglit_gbm_framework.c
+++ b/tests/util/piglit-framework-gl/piglit_gbm_framework.c
@@ -154,9 +154,9 @@ piglit_gbm_console_display(void)
 		       &pixels[piglit_width * i],
 		       4 * piglit_width);
 		memcpy(&pixels[piglit_width * i],
-		       &pixels[piglit_width * (piglit_height - i)],
+		       &pixels[piglit_width * (piglit_height - 1 - i)],
 		       4 * piglit_width);
-		memcpy(&pixels[piglit_width * (piglit_height - i)],
+		memcpy(&pixels[piglit_width * (piglit_height - 1 - i)],
 		       &pixels[piglit_width * piglit_height],
 		       4 * piglit_width);
 	}
-- 
2.1.3



More information about the Piglit mailing list