summaryrefslogtreecommitdiffstats
path: root/modules/mono/utils/string_utils.cpp
diff options
context:
space:
mode:
authorbruvzg <7645683+bruvzg@users.noreply.github.com>2022-07-05 15:18:29 +0300
committerbruvzg <7645683+bruvzg@users.noreply.github.com>2022-07-07 11:07:18 +0300
commit0c5431644d103728aa926896d9bbdf40ed8d5cc3 (patch)
tree8f26e1af2ef948101163bb9fc9546be40bb4bc3c /modules/mono/utils/string_utils.cpp
parent28a3dee276d64d7c2bf1c7d54ebbb5a6b82caf4a (diff)
downloadredot-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/mono/utils/string_utils.cpp')
-rw-r--r--modules/mono/utils/string_utils.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/mono/utils/string_utils.cpp b/modules/mono/utils/string_utils.cpp
index 64b68b70af..975f2d8332 100644
--- a/modules/mono/utils/string_utils.cpp
+++ b/modules/mono/utils/string_utils.cpp
@@ -178,7 +178,7 @@ Error read_all_file_utf8(const String &p_path, String &r_content) {
w[len] = 0;
String source;
- if (source.parse_utf8((const char *)w)) {
+ if (source.parse_utf8((const char *)w) != OK) {
ERR_FAIL_V(ERR_INVALID_DATA);
}