aboutsummaryrefslogtreecommitdiff
path: root/src/server.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server.cpp')
-rw-r--r--src/server.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/server.cpp b/src/server.cpp
index ad469d655..701339ad8 100644
--- a/src/server.cpp
+++ b/src/server.cpp
@@ -2576,7 +2576,10 @@ void Server::sendDetachedInventory(const std::string &name, session_t peer_id)
// Serialization & NetworkPacket isn't a love story
std::ostringstream os(std::ios_base::binary);
inv_it->second->serialize(os);
- pkt << os.str();
+
+ std::string os_str = os.str();
+ pkt << static_cast<u16>(os_str.size()); // HACK: to keep compatibility with 5.0.0 clients
+ pkt.putRawString(os_str);
}
if (peer_id == PEER_ID_INEXISTENT)