Merge pull request #22250 from ibrahn/shader_lang_vector_gotcha

Fixed an access after free in ShaderLanguage::_reduce_expression.
This commit is contained in:
Rémi Verschelde 2018-09-20 13:43:34 +02:00 committed by GitHub
commit e5bdf5e37b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -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) {