Merge pull request #22250 from ibrahn/shader_lang_vector_gotcha
Fixed an access after free in ShaderLanguage::_reduce_expression.
This commit is contained in:
commit
e5bdf5e37b
|
@ -3437,8 +3437,9 @@ ShaderLanguage::Node *ShaderLanguage::_reduce_expression(BlockNode *p_block, Sha
|
|||
}
|
||||
}
|
||||
} else {
|
||||
ConstantNode::Value value = values[0];
|
||||
for (int i = 1; i < cardinality; i++) {
|
||||
values.push_back(values[0]);
|
||||
values.push_back(value);
|
||||
}
|
||||
}
|
||||
} else if (values.size() != cardinality) {
|
||||
|
|
Loading…
Reference in New Issue