From ed227b7b8ddc3aad6ed764124e94caae6b98d182 Mon Sep 17 00:00:00 2001 From: Brian Date: Wed, 8 Aug 2007 16:07:28 -0600 Subject: [PATCH] added assertion --- src/mesa/pipe/softpipe/sp_surface.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mesa/pipe/softpipe/sp_surface.c b/src/mesa/pipe/softpipe/sp_surface.c index 85e1fcfa38f..174dcc01692 100644 --- a/src/mesa/pipe/softpipe/sp_surface.c +++ b/src/mesa/pipe/softpipe/sp_surface.c @@ -323,6 +323,8 @@ a8r8g8b8_get_tile(struct pipe_surface *ps, const GLuint *src = ((const GLuint *) ps->region->map) + y * ps->region->pitch + x; GLuint i, j; + assert(x + w <= ps->width); + assert(y + h <= ps->height); for (i = 0; i < h; i++) { for (j = 0; j < w; j++) { p[0] = UBYTE_TO_FLOAT((src[j] >> 16) & 0xff); -- 2.30.2