From: Brian Paul Date: Mon, 23 Jun 2008 14:35:41 +0000 (-0600) Subject: gallium: added some assertions X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=016dbb0cf395702cfad046f827e3cc4541ae5818;p=mesa.git gallium: added some assertions --- diff --git a/src/gallium/auxiliary/util/p_util.c b/src/gallium/auxiliary/util/p_util.c index 2a92f8e408b..0e3f082b3ee 100644 --- a/src/gallium/auxiliary/util/p_util.c +++ b/src/gallium/auxiliary/util/p_util.c @@ -53,6 +53,12 @@ pipe_copy_rect(ubyte * dst, { unsigned i; + assert(cpp > 0); + assert(src_x >= 0); + assert(src_y >= 0); + assert(dst_x >= 0); + assert(dst_y >= 0); + dst_pitch *= cpp; src_pitch *= cpp; dst += dst_x * cpp;