Skip to content

Commit

Permalink
[HTML5] Fix JavaScript string parsing with new interface.
Browse files Browse the repository at this point in the history
Strings are UTF-8 encoded and should be parsed as such, while it was
being parsed as a C string before.
  • Loading branch information
Faless committed Jul 7, 2021
1 parent 7428c07 commit d4e302a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion platform/javascript/javascript_singleton.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit d4e302a

Please sign in to comment.