Skip to content

Commit

Permalink
Core: Fix issues with party/linkshell ZMQ message construction
Browse files Browse the repository at this point in the history
  • Loading branch information
zach2good committed Jan 14, 2025
1 parent 0c5c0fc commit f7d060b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/map/message.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ namespace message

if (PParty)
{
auto newPacket = std::unique_ptr<CBasicPacket>();
auto newPacket = std::make_unique<CBasicPacket>();
std::memcpy(*newPacket, packet.data(), std::min<size_t>(packet.size(), PACKET_SIZE));
PParty->PushPacket(senderid, 0, newPacket);
}
Expand Down Expand Up @@ -202,7 +202,7 @@ namespace message
{
for (auto& currentParty : PAlliance->partyList)
{
auto newPacket = std::unique_ptr<CBasicPacket>();
auto newPacket = std::make_unique<CBasicPacket>();
std::memcpy(*newPacket, packet.data(), std::min<size_t>(packet.size(), PACKET_SIZE));
currentParty->PushPacket(senderid, 0, newPacket);
}
Expand All @@ -215,7 +215,7 @@ namespace message
CLinkshell* PLinkshell = linkshell::GetLinkshell(linkshellID);
if (PLinkshell)
{
auto newPacket = std::unique_ptr<CBasicPacket>();
auto newPacket = std::make_unique<CBasicPacket>();
std::memcpy(*newPacket, packet.data(), std::min<size_t>(packet.size(), PACKET_SIZE));
PLinkshell->PushPacket(ref<uint32>((uint8*)extra.data(), 4), newPacket);
}
Expand Down

0 comments on commit f7d060b

Please sign in to comment.