From 326e483ef374f505398aebb159376402d77e3b8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Sat, 12 Jun 2021 21:52:15 +0200 Subject: VariantParser: Fix reading StringNames with '&'. Keep support for '@' for now for compatibility. Fixes #49535. Fixes #49542. --- core/variant/variant_parser.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'core/variant/variant_parser.cpp') 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; } -- cgit v1.2.3