Merge pull request #50247 from Faless/js/if_fix

[HTML5] Fix JavaScript string parsing with new interface.
This commit is contained in:
Rémi Verschelde 2021-07-07 16:42:48 +02:00 committed by GitHub
commit 56d7126864
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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