diff options
author | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2021-07-07 15:44:29 +0200 |
---|---|---|
committer | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2021-07-07 15:44:29 +0200 |
commit | d4e302a3a499b4a3445b4e1610757fc310d1641d (patch) | |
tree | 1a0c44cd0395793f8552cad64e4cea45435f0ad9 /platform | |
parent | 7428c076247254c215b984410816148a6515e471 (diff) |
[HTML5] Fix JavaScript string parsing with new interface.
Strings are UTF-8 encoded and should be parsed as such, while it was
being parsed as a C string before.
Diffstat (limited to 'platform')
-rw-r--r-- | platform/javascript/javascript_singleton.cpp | 2 |
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; } |