From 98e15a34a416c31d4689836f4f38161f1270513c Mon Sep 17 00:00:00 2001 From: Tycho Date: Mon, 10 Mar 2014 13:18:53 -0700 Subject: Fixed xofts issues --- src/WorldStorage/FireworksSerializer.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/WorldStorage/FireworksSerializer.cpp') diff --git a/src/WorldStorage/FireworksSerializer.cpp b/src/WorldStorage/FireworksSerializer.cpp index bdd5952ad..3c97ae0a2 100644 --- a/src/WorldStorage/FireworksSerializer.cpp +++ b/src/WorldStorage/FireworksSerializer.cpp @@ -91,6 +91,8 @@ void cFireworkItem::ParseFromNBT(cFireworkItem & a_FireworkItem, const cParsedNB { // Divide by four as data length returned in bytes int DataLength = a_NBT.GetDataLength(explosiontag); + // round to the next highest multiple of four + DataLength -= DataLength % 4; if (DataLength == 0) { continue; @@ -105,6 +107,8 @@ void cFireworkItem::ParseFromNBT(cFireworkItem & a_FireworkItem, const cParsedNB else if (ExplosionName == "FadeColors") { int DataLength = a_NBT.GetDataLength(explosiontag) / 4; + // round to the next highest multiple of four + DataLength -= DataLength % 4; if (DataLength == 0) { continue; -- cgit v1.2.3