From ff893a83f1a764ad4b093582bf28ff5e42860049 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 18 Oct 2006 17:36:57 +0000 Subject: Fix a dangerous use of ASSERT in an else-clause not enclosed in braces. We've been lucky if this hasn't been causing line rendering bugs. --- src/mesa/tnl/t_vb_cliptmp.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/mesa/tnl/t_vb_cliptmp.h b/src/mesa/tnl/t_vb_cliptmp.h index f3776e7eeb6..e5e379e1513 100644 --- a/src/mesa/tnl/t_vb_cliptmp.h +++ b/src/mesa/tnl/t_vb_cliptmp.h @@ -153,8 +153,9 @@ TAG(clip_line)( GLcontext *ctx, GLuint v0, GLuint v1, GLubyte mask ) v0 = newvert; newvert++; } - else + else { ASSERT(t0 == 0.0); + } if (VB->ClipMask[v1]) { INTERP_4F( t1, coord[newvert], coord[v1], coord[v0] ); @@ -167,8 +168,9 @@ TAG(clip_line)( GLcontext *ctx, GLuint v0, GLuint v1, GLubyte mask ) newvert++; } - else + else { ASSERT(t1 == 0.0); + } tnl->Driver.Render.ClippedLine( ctx, v0, v1 ); } -- cgit v1.2.3