summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-09-23 22:11:25 +0200
committermadmaxoft <github@xoft.cz>2014-09-23 22:12:47 +0200
commit0b40ce971c85eb7037250b03bab01a66536e7b05 (patch)
treec4325610c0f51614883beedb08c54cdc40c5e6ec
parentMerge pull request #1372 from mc-server/EntityCustomName (diff)
downloadcuberite-0b40ce971c85eb7037250b03bab01a66536e7b05.tar
cuberite-0b40ce971c85eb7037250b03bab01a66536e7b05.tar.gz
cuberite-0b40ce971c85eb7037250b03bab01a66536e7b05.tar.bz2
cuberite-0b40ce971c85eb7037250b03bab01a66536e7b05.tar.lz
cuberite-0b40ce971c85eb7037250b03bab01a66536e7b05.tar.xz
cuberite-0b40ce971c85eb7037250b03bab01a66536e7b05.tar.zst
cuberite-0b40ce971c85eb7037250b03bab01a66536e7b05.zip
-rw-r--r--src/WorldStorage/WSSAnvil.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/WorldStorage/WSSAnvil.cpp b/src/WorldStorage/WSSAnvil.cpp
index 10cc39083..e132a0c26 100644
--- a/src/WorldStorage/WSSAnvil.cpp
+++ b/src/WorldStorage/WSSAnvil.cpp
@@ -2464,19 +2464,19 @@ void cWSSAnvil::LoadWolfFromNBT(cEntityList & a_Entities, const cParsedNBT & a_N
LoadWolfOwner(*Monster.get(), a_NBT, a_TagIdx);
int SittingIdx = a_NBT.FindChildByName(a_TagIdx, "Sitting");
- if (SittingIdx > 0)
+ if ((SittingIdx > 0) && (a_NBT.GetType(SittingIdx) == TAG_Byte))
{
bool Sitting = ((a_NBT.GetByte(SittingIdx) == 1) ? true : false);
Monster->SetIsSitting(Sitting);
}
int AngryIdx = a_NBT.FindChildByName(a_TagIdx, "Angry");
- if (AngryIdx > 0)
+ if ((AngryIdx > 0) && (a_NBT.GetType(AngryIdx) == TAG_Byte))
{
bool Angry = ((a_NBT.GetByte(AngryIdx) == 1) ? true : false);
Monster->SetIsAngry(Angry);
}
int CollarColorIdx = a_NBT.FindChildByName(a_TagIdx, "CollarColor");
- if (CollarColorIdx > 0)
+ if ((CollarColorIdx > 0) && (a_NBT.GetType(CollarColorIdx) == TAG_Int))
{
int CollarColor = a_NBT.GetInt(CollarColorIdx);
Monster->SetCollarColor(CollarColor);