mesa: glsl: added some post incr/decr error checks
authorBrian Paul <brian.paul@tungstengraphics.com>
Tue, 19 Aug 2008 17:31:10 +0000 (11:31 -0600)
committerBrian Paul <brian.paul@tungstengraphics.com>
Tue, 19 Aug 2008 17:31:10 +0000 (11:31 -0600)
src/mesa/shader/slang/slang_codegen.c

index e5a2c61d4f308be38f21f3c1650f3d68082de259..6cadd2c2507772a0336b0fd0e3062c7f2a74c524 100644 (file)
@@ -2729,7 +2729,11 @@ _slang_assignment_compatible(slang_assemble_ctx *A,
    slang_typeinfo t0, t1;
    GLuint sz0, sz1;
 
-   
+   if (op0->type == SLANG_OPER_POSTINCREMENT ||
+       op0->type == SLANG_OPER_POSTDECREMENT) {
+      return GL_FALSE;
+   }
+
    slang_typeinfo_construct(&t0);
    _slang_typeof_operation(A, op0, &t0);