summaryrefslogtreecommitdiff
path: root/scene/resources
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-07-07 11:58:44 +0200
committerGitHub <noreply@github.com>2022-07-07 11:58:44 +0200
commitbc419e1c5ee3a0cd8c4156b2e65d94f6f46c7543 (patch)
tree001582076bb72e265a8b6f469b2a19940432dcb4 /scene/resources
parent8ec6c075bd38620358c1cadafa1a515a5711695a (diff)
parent0c5431644d103728aa926896d9bbdf40ed8d5cc3 (diff)
Merge pull request #62735 from bruvzg/unicode_parsers
Diffstat (limited to 'scene/resources')
-rw-r--r--scene/resources/text_file.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/resources/text_file.cpp b/scene/resources/text_file.cpp
index 96a47c37c4..0404e1f79b 100644
--- a/scene/resources/text_file.cpp
+++ b/scene/resources/text_file.cpp
@@ -64,7 +64,7 @@ Error TextFile::load_text(const String &p_path) {
w[len] = 0;
String s;
- ERR_FAIL_COND_V_MSG(s.parse_utf8((const char *)w), 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.");
+ ERR_FAIL_COND_V_MSG(s.parse_utf8((const char *)w) != OK, 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.");
text = s;
path = p_path;
return OK;