summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Marques <george@gmarqu.es>2018-07-26 10:52:11 -0300
committerGeorge Marques <george@gmarqu.es>2018-07-26 10:52:11 -0300
commite8da2a60b3b112919e237c5cbd3e79d76e39cf0b (patch)
tree41f301652e5eabf9e7ad6623298eff2fd4648d7b
parent91d6fa817ec412b1cb7a753e812e76aa952a7ac0 (diff)
GDScript: Fix parse error in string formatting
-rw-r--r--modules/gdscript/gdscript_parser.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/gdscript/gdscript_parser.cpp b/modules/gdscript/gdscript_parser.cpp
index a0e58e3a37..852d465206 100644
--- a/modules/gdscript/gdscript_parser.cpp
+++ b/modules/gdscript/gdscript_parser.cpp
@@ -5441,7 +5441,7 @@ GDScriptParser::DataType GDScriptParser::_get_operation_type(const Variant::Oper
if (b_type == Variant::INT || b_type == Variant::REAL) {
Variant::evaluate(Variant::OP_ADD, b, 1, b, r_valid);
}
- if (a_type == Variant::STRING) {
+ if (a_type == Variant::STRING && b_type != Variant::ARRAY) {
a = "%s"; // Work around for formatting operator (%)
}