### Godot version

4.0 beta17

### System information

Windows10

### Issue description

call `"".split()`
Is there an infinite loop inside? Function does not return.

### Steps to reproduce

"".split()

### Minimal reproduction project

N/A
} else if (c <= 0xffff) { 
			fl += 3;
		} else if (c <= 0x001fffff) { 
			fl += 4;
		} else if (c <= 0x03ffffff) { 
			fl += 5;
			print_unicode_error(vformat("Invalid unicode codepoint (%x)", c));
		} else if (c <= 0x7fffffff) { 
			fl += 6;
			print_unicode_error(vformat("Invalid unicode codepoint (%x)", c));
		} else {
			fl += 1;
			print_unicode_error(vformat("Invalid unicode codepoint (%x), cannot represent as UTF-8", c), true);
		}
	}
	CharString utf8s;
	if (fl == 0) {
		return utf8s;
	}
	utf8s.resize(fl + 1);
	uint8_t *cdst = (uint8_t *)utf8s.get_data();
#define APPEND_CHAR(m_c) *(cdst++) = m_c
	for (int i = 0; i < l; i++) {
		uint32_t c = d[i];
		if (c <= 0x7f) { 
			APPEND_CHAR(c);
		} else if (c <= 0x7ff) { 
			APPEND_CHAR(uint32_t(0xc0 | ((c >> 6) & 0x1f))); 
			APPEND_CHAR(uint32_t(0x80 | (c & 0x3f))); 
		} else if (c <= 0xffff) {