1
0

Fixed cBlockArea schematic string saving signature.

This commit is contained in:
madmaxoft
2014-03-07 21:28:52 +01:00
parent 51c1849762
commit ffdf5f2022
4 changed files with 13 additions and 10 deletions

View File

@@ -103,7 +103,7 @@ bool cSchematicFileSerializer::SaveToSchematicFile(const cBlockArea & a_BlockAre
AString cSchematicFileSerializer::SaveToSchematicString(const cBlockArea & a_BlockArea)
bool cSchematicFileSerializer::SaveToSchematicString(const cBlockArea & a_BlockArea, AString & a_Out)
{
// Serialize into NBT data:
AString NBT = SaveToSchematicNBT(a_BlockArea);
@@ -114,14 +114,13 @@ AString cSchematicFileSerializer::SaveToSchematicString(const cBlockArea & a_Blo
}
// Gzip the data:
AString Compressed;
int res = CompressStringGZIP(NBT.data(), NBT.size(), Compressed);
int res = CompressStringGZIP(NBT.data(), NBT.size(), a_Out);
if (res != Z_OK)
{
LOG("%s: Cannot Gzip the area data NBT representation: %d", __FUNCTION__, res);
return false;
}
return Compressed;
return true;
}