GDScript: Fix wrong argument check for formatting operator

This commit is contained in:
George Marques 2020-08-17 19:49:54 -03:00
parent ba1109a3b3
commit d45e1befe3
No known key found for this signature in database
GPG Key ID: 046BD46A3201E43D

View File

@ -2883,7 +2883,7 @@ GDScriptParser::DataType GDScriptAnalyzer::get_operation_type(Variant::Operator
}
// Avoid error in formatting operator (%) where it doesn't find a placeholder.
if (a_type == Variant::STRING) {
if (a_type == Variant::STRING && b_type != Variant::ARRAY) {
a = String("%s");
}