OSDN Git Service

Fix a dangerous use of ASSERT in an else-clause not enclosed in braces.
authorBrian Paul <brian.paul@tungstengraphics.com>
Wed, 18 Oct 2006 17:36:57 +0000 (17:36 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Wed, 18 Oct 2006 17:36:57 +0000 (17:36 +0000)
We've been lucky if this hasn't been causing line rendering bugs.

src/mesa/tnl/t_vb_cliptmp.h

index f3776e7..e5e379e 100644 (file)
@@ -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 );
 }