1
0
Fork 0

Merge pull request #107424 from Ivorforce/gdscript-editor-crash

Fix a crash when the first line of GDScript code is indented.
This commit is contained in:
Rémi Verschelde 2025-06-12 01:15:19 +02:00
commit 36ab56a0a1
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 2 additions and 5 deletions

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();