VariantParser: Fix reading StringNames with '&'.
Keep support for '@' for now for compatibility. Fixes #49535. Fixes #49542.
This commit is contained in:
parent
0024bb3f4e
commit
326e483ef3
@ -190,10 +190,13 @@ Error VariantParser::get_token(Stream *p_stream, Token &r_token, int &line, Stri
|
|||||||
r_token.type = TK_COLOR;
|
r_token.type = TK_COLOR;
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
case '@': {
|
#ifndef DISABLE_DEPRECATED
|
||||||
|
case '@': // Compatibility with 3.x StringNames.
|
||||||
|
#endif
|
||||||
|
case '&': { // StringName.
|
||||||
cchar = p_stream->get_char();
|
cchar = p_stream->get_char();
|
||||||
if (cchar != '"') {
|
if (cchar != '"') {
|
||||||
r_err_str = "Expected '\"' after '@'";
|
r_err_str = "Expected '\"' after '&'";
|
||||||
r_token.type = TK_ERROR;
|
r_token.type = TK_ERROR;
|
||||||
return ERR_PARSE_ERROR;
|
return ERR_PARSE_ERROR;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user