Skip to content

Commit

Permalink
Merge pull request #6726 from WinterSolstice8/fix_packet_fmt_crash
Browse files Browse the repository at this point in the history
[core] Use byte instead of char in PrintPacket
  • Loading branch information
zach2good authored Jan 15, 2025
2 parents 72170d4 + a6a3459 commit fa88c83
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/map/packet_system.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,8 @@ void PrintPacket(CBasicPacket& packet)

for (std::size_t idx = 0U; idx < packet.getSize(); idx++)
{
message.append(fmt::format("{:02x} ", (char*)packet[idx]));
uint8 byte = *packet[idx];
message.append(fmt::format("{:02x} ", byte));

if (((idx + 1U) % 16U) == 0U)
{
Expand Down

0 comments on commit fa88c83

Please sign in to comment.