mesa: fix potential uninitialized memory reads
[mesa.git] / src / mesa / main / rastpos.c
index 9842172f460074ff4a3a916f305c836b1992000e..9f309d6ab846679aafc51e97d10bc89c6eec2a73 100644 (file)
@@ -500,7 +500,7 @@ void _mesa_init_rastpos( GLcontext * ctx )
    ASSIGN_4V( ctx->Current.RasterColor, 1.0, 1.0, 1.0, 1.0 );
    ASSIGN_4V( ctx->Current.RasterSecondaryColor, 0.0, 0.0, 0.0, 1.0 );
    ctx->Current.RasterIndex = 1.0;
-   for (i=0; i<MAX_TEXTURE_UNITS; i++)
+   for (i = 0; i < MAX_TEXTURE_COORD_UNITS; i++)
       ASSIGN_4V( ctx->Current.RasterTexCoords[i], 0.0, 0.0, 0.0, 1.0 );
    ctx->Current.RasterPosValid = GL_TRUE;
 }