From 74795b98da6b40070cfaa2c81c44647c2135f326 Mon Sep 17 00:00:00 2001 From: Fabio Alessandrelli Date: Mon, 14 Aug 2017 13:13:21 +0200 Subject: [PATCH] Fix StreamPeer put_utf8_string not working --- core/io/stream_peer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/io/stream_peer.cpp b/core/io/stream_peer.cpp index faf0700edf3..7042700d924 100644 --- a/core/io/stream_peer.cpp +++ b/core/io/stream_peer.cpp @@ -210,7 +210,7 @@ void StreamPeer::put_double(double p_val) { void StreamPeer::put_utf8_string(const String &p_string) { CharString cs = p_string.utf8(); - put_u32(p_string.length()); + put_u32(cs.length()); put_data((const uint8_t *)cs.get_data(), cs.length()); } void StreamPeer::put_var(const Variant &p_variant) {