diff options
| author | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2022-07-05 15:18:29 +0300 |
|---|---|---|
| committer | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2022-07-07 11:07:18 +0300 |
| commit | 0c5431644d103728aa926896d9bbdf40ed8d5cc3 (patch) | |
| tree | 8f26e1af2ef948101163bb9fc9546be40bb4bc3c /modules/gdscript/gdscript.cpp | |
| parent | 28a3dee276d64d7c2bf1c7d54ebbb5a6b82caf4a (diff) | |
| download | redot-engine-0c5431644d103728aa926896d9bbdf40ed8d5cc3.tar.gz | |
Allows parsing of invalid UTF-16 surrogates (can be encountered in Windows filenames) and some non-standard UTF-8 variants, makes Unicode parse errors more verbose.
Diffstat (limited to 'modules/gdscript/gdscript.cpp')
| -rw-r--r-- | modules/gdscript/gdscript.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/gdscript/gdscript.cpp b/modules/gdscript/gdscript.cpp index e6aeef2fd1..bf83353ead 100644 --- a/modules/gdscript/gdscript.cpp +++ b/modules/gdscript/gdscript.cpp @@ -1050,7 +1050,7 @@ Error GDScript::load_source_code(const String &p_path) { w[len] = 0; String s; - if (s.parse_utf8((const char *)w)) { + if (s.parse_utf8((const char *)w) != OK) { ERR_FAIL_V_MSG(ERR_INVALID_DATA, "Script '" + p_path + "' contains invalid unicode (UTF-8), so it was not loaded. Please ensure that scripts are saved in valid UTF-8 unicode."); } |
