1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Fix a crash when the first line of GDScript code is indented.

Co-authored-by: dalexeev <dalexeev12@yandex.ru>
This commit is contained in:
Lukas Tenbrink
2025-06-11 23:05:45 +02:00
parent 51b0379e55
commit dcb7b21522

View File

@@ -271,12 +271,9 @@ String GDScriptTokenizer::get_token_name(Token::Type p_token_type) {
void GDScriptTokenizerText::set_source_code(const String &p_source_code) {
source = p_source_code;
if (source.is_empty()) {
_source = U"";
} else {
_source = source.ptr();
}
_source = source.get_data();
_current = _source;
_start = _source;
line = 1;
column = 1;
length = p_source_code.length();