mesa: glsl: added initializer size/type error checking

This commit is contained in:
Brian Paul 2008-08-04 10:21:55 -06:00
parent 7c59a2b5a2
commit e68a3ef1ef

View file

@ -2687,11 +2687,12 @@ _slang_gen_declaration(slang_assemble_ctx *A, slang_operation *oper)
if (!rhs)
return NULL;
assert(rhs);
if (!rhs->Store || var->Store->Size != rhs->Store->Size) {
slang_info_log_error(A->log, "invalid assignment (wrong types)");
return NULL;
}
init = new_node2(IR_MOVE, var, rhs);
/*
assert(rhs->Opcode != IR_SEQ);
*/
n = new_seq(varDecl, init);
}
else {