Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/client/protocolgameparse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1498,7 +1498,7 @@ void ProtocolGame::parseOwnTrade(const InputMessagePtr& msg)
const auto& name = g_game.formatCreatureName(msg->getString());

const uint8_t count = msg->getU8();
std::vector<ItemPtr> items;
std::vector<ItemPtr> items(count);

for (auto i = 0; i < count; i++) {
items[i] = getItem(msg);
Expand All @@ -1512,7 +1512,7 @@ void ProtocolGame::parseCounterTrade(const InputMessagePtr& msg)
const auto& name = g_game.formatCreatureName(msg->getString());

const uint8_t count = msg->getU8();
std::vector<ItemPtr> items;
std::vector<ItemPtr> items(count);

for (auto i = 0; i < count; i++) {
items[i] = getItem(msg);
Expand Down