GDScript: Fix "Mismatched external parser" for autoloads

This commit is contained in:
Danil Alexeev 2024-07-09 16:16:45 +03:00
parent 82cedc83c9
commit 110c4d4067
No known key found for this signature in database
GPG key ID: 124453E157DA8DC7
2 changed files with 3 additions and 3 deletions

View file

@ -413,7 +413,7 @@ Error GDScriptParser::parse_binary(const Vector<uint8_t> &p_binary, const String
}
tokenizer = buffer_tokenizer;
script_path = p_script_path;
script_path = p_script_path.simplify_path();
current = tokenizer->scan();
// Avoid error or newline as the first token.
// The latter can mess with the parser when opening files filled exclusively with comments and newlines.