summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-06-12 22:43:08 +0200
committerGitHub <noreply@github.com>2021-06-12 22:43:08 +0200
commitedee79862894538ba29f0d2d4e90bdc970ba9e1c (patch)
treef9950d97ce54e9271fd75d2a2d593b1ab78cb938
parent2787ee634adf70092a960f4aa5104bba63db1c48 (diff)
parent326e483ef374f505398aebb159376402d77e3b8f (diff)
Merge pull request #49544 from akien-mga/variantparser-stringname-compat
VariantParser: Fix reading StringNames with '&'.
-rw-r--r--core/variant/variant_parser.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/core/variant/variant_parser.cpp b/core/variant/variant_parser.cpp
index 12b5aa6590..751cb64c62 100644
--- a/core/variant/variant_parser.cpp
+++ b/core/variant/variant_parser.cpp
@@ -190,10 +190,13 @@ Error VariantParser::get_token(Stream *p_stream, Token &r_token, int &line, Stri
r_token.type = TK_COLOR;
return OK;
}
- case '@': {
+#ifndef DISABLE_DEPRECATED
+ case '@': // Compatibility with 3.x StringNames.
+#endif
+ case '&': { // StringName.
cchar = p_stream->get_char();
if (cchar != '"') {
- r_err_str = "Expected '\"' after '@'";
+ r_err_str = "Expected '\"' after '&'";
r_token.type = TK_ERROR;
return ERR_PARSE_ERROR;
}