Fix for empty key/value when reading item string with wear but no metadata (#6058)

master
Jesse McDonald 2017-06-27 05:34:11 -05:00 committed by Loïc Blot
parent d7343b6c93
commit 85d7b18d85
1 changed files with 12 additions and 10 deletions

View File

@ -28,7 +28,8 @@ void ItemStackMetadata::deSerialize(std::istream &is)
m_stringvars.clear();
if (!in.empty() && in[0] == DESERIALIZE_START) {
if (!in.empty()) {
if (in[0] == DESERIALIZE_START) {
Strfnd fnd(in);
fnd.to(1);
while (!fnd.at_end()) {
@ -40,4 +41,5 @@ void ItemStackMetadata::deSerialize(std::istream &is)
// BACKWARDS COMPATIBILITY
m_stringvars[""] = in;
}
}
}