1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-12 13:20:55 +00:00

Use append_ instead of parse_ for String methods.

This commit is contained in:
Lukas Tenbrink
2025-03-24 12:25:48 +01:00
parent 594d64ec24
commit ffa6ef220b
62 changed files with 245 additions and 274 deletions

View File

@@ -646,9 +646,9 @@ void WSLPeer::_wsl_msg_recv_callback(wslay_event_context_ptr ctx, const struct w
// Close request or confirmation.
peer->close_code = arg->status_code;
size_t len = arg->msg_length;
peer->close_reason = "";
peer->close_reason.clear();
if (len > 2 /* first 2 bytes = close code */) {
peer->close_reason.parse_utf8((char *)arg->msg + 2, len - 2);
peer->close_reason.append_utf8((char *)arg->msg + 2, len - 2);
}
if (peer->ready_state == STATE_OPEN) {
peer->ready_state = STATE_CLOSING;