aboutsummaryrefslogtreecommitdiff
path: root/src/tool.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/tool.cpp')
-rw-r--r--src/tool.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/tool.cpp b/src/tool.cpp
index 22e41d28e..90f4f9c12 100644
--- a/src/tool.cpp
+++ b/src/tool.cpp
@@ -66,7 +66,7 @@ void ToolCapabilities::serialize(std::ostream &os, u16 protocol_version) const
for (const auto &groupcap : groupcaps) {
const std::string *name = &groupcap.first;
const ToolGroupCap *cap = &groupcap.second;
- os << serializeString(*name);
+ os << serializeString16(*name);
writeS16(os, cap->uses);
writeS16(os, cap->maxlevel);
writeU32(os, cap->times.size());
@@ -79,7 +79,7 @@ void ToolCapabilities::serialize(std::ostream &os, u16 protocol_version) const
writeU32(os, damageGroups.size());
for (const auto &damageGroup : damageGroups) {
- os << serializeString(damageGroup.first);
+ os << serializeString16(damageGroup.first);
writeS16(os, damageGroup.second);
}
@@ -98,7 +98,7 @@ void ToolCapabilities::deSerialize(std::istream &is)
groupcaps.clear();
u32 groupcaps_size = readU32(is);
for (u32 i = 0; i < groupcaps_size; i++) {
- std::string name = deSerializeString(is);
+ std::string name = deSerializeString16(is);
ToolGroupCap cap;
cap.uses = readS16(is);
cap.maxlevel = readS16(is);
@@ -113,7 +113,7 @@ void ToolCapabilities::deSerialize(std::istream &is)
u32 damage_groups_size = readU32(is);
for (u32 i = 0; i < damage_groups_size; i++) {
- std::string name = deSerializeString(is);
+ std::string name = deSerializeString16(is);
s16 rating = readS16(is);
damageGroups[name] = rating;
}