diff options
author | George Marques <george@gmarqu.es> | 2020-08-17 19:49:54 -0300 |
---|---|---|
committer | George Marques <george@gmarqu.es> | 2020-08-17 19:49:54 -0300 |
commit | d45e1befe3be6054f2ad19c2130c66d5c3a84307 (patch) | |
tree | a26cb778e4b7a672eec28d6fb68d5a176a8fd73d /modules | |
parent | ba1109a3b3596d263182836c4f45cbffd12ac8f2 (diff) |
GDScript: Fix wrong argument check for formatting operator
Diffstat (limited to 'modules')
-rw-r--r-- | modules/gdscript/gdscript_analyzer.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/gdscript/gdscript_analyzer.cpp b/modules/gdscript/gdscript_analyzer.cpp index 561cdbbda4..c1c1cc80fc 100644 --- a/modules/gdscript/gdscript_analyzer.cpp +++ b/modules/gdscript/gdscript_analyzer.cpp @@ -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"); } |