mirror of
https://github.com/minetest/minetest.git
synced 2024-11-30 11:33:44 +01:00
Fix for empty key/value when reading item string with wear but no metadata (#6058)
This commit is contained in:
parent
a08a93bc9c
commit
46ff2e2cef
@ -28,7 +28,8 @@ void ItemStackMetadata::deSerialize(std::istream &is)
|
|||||||
|
|
||||||
m_stringvars.clear();
|
m_stringvars.clear();
|
||||||
|
|
||||||
if (!in.empty() && in[0] == DESERIALIZE_START) {
|
if (!in.empty()) {
|
||||||
|
if (in[0] == DESERIALIZE_START) {
|
||||||
Strfnd fnd(in);
|
Strfnd fnd(in);
|
||||||
fnd.to(1);
|
fnd.to(1);
|
||||||
while (!fnd.at_end()) {
|
while (!fnd.at_end()) {
|
||||||
@ -40,4 +41,5 @@ void ItemStackMetadata::deSerialize(std::istream &is)
|
|||||||
// BACKWARDS COMPATIBILITY
|
// BACKWARDS COMPATIBILITY
|
||||||
m_stringvars[""] = in;
|
m_stringvars[""] = in;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user