summaryrefslogtreecommitdiff
path: root/src/network/network_content.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/network/network_content.cpp')
-rw-r--r--src/network/network_content.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/network/network_content.cpp b/src/network/network_content.cpp
index f78a839b8..27ffee970 100644
--- a/src/network/network_content.cpp
+++ b/src/network/network_content.cpp
@@ -70,9 +70,9 @@ bool ClientNetworkContentSocketHandler::Receive_SERVER_INFO(Packet *p)
ci->dependencies = MallocT<ContentID>(ci->dependency_count);
for (uint i = 0; i < ci->dependency_count; i++) ci->dependencies[i] = (ContentID)p->Recv_uint32();
- ci->tag_count = p->Recv_uint8();
- ci->tags = MallocT<char[32]>(ci->tag_count);
- for (uint i = 0; i < ci->tag_count; i++) p->Recv_string(ci->tags[i], lengthof(*ci->tags));
+ uint tag_count = p->Recv_uint8();
+ ci->tags.reserve(tag_count);
+ for (uint i = 0; i < tag_count; i++) ci->tags.push_back(p->Recv_string(NETWORK_CONTENT_TAG_LENGTH));
if (!ci->IsValid()) {
delete ci;