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 e5a2c61..6cadd2c 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);