[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.
This commit is contained in:
Fabio Alessandrelli 2021-07-07 15:44:29 +02:00
parent 7428c07624
commit d4e302a3a4
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}