summaryrefslogtreecommitdiff
path: root/platform/javascript/javascript_singleton.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'platform/javascript/javascript_singleton.cpp')
-rw-r--r--platform/javascript/javascript_singleton.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/platform/javascript/javascript_singleton.cpp b/platform/javascript/javascript_singleton.cpp
index 9de2edc9a7..1dd73ef8e9 100644
--- a/platform/javascript/javascript_singleton.cpp
+++ b/platform/javascript/javascript_singleton.cpp
@@ -183,7 +183,7 @@ Variant JavaScriptObjectImpl::_js2variant(int p_type, godot_js_wrapper_ex *p_val
case Variant::FLOAT:
return p_val->r;
case Variant::STRING: {
- String out((const char *)p_val->p);
+ String out = String::utf8((const char *)p_val->p);
free(p_val->p);
return out;
}