Converted eroneous writeLong/readInt boolean entries used writeBool/readBool.

This commit is contained in:
Robert Osfield
2003-09-02 17:16:17 +00:00
parent da6f7ebeef
commit f90e4ff5f8
6 changed files with 393 additions and 387 deletions

View File

@@ -58,8 +58,9 @@ void Image::write(DataOutputStream* out)
out->writeInt(_mipmapData[i]);
// Write image data if any
out->writeLong((long)data());
if(data()){
out->writeBool(data()!=0);
if(data())
{
// Compute the size of image data and write this.
unsigned int size = getTotalSizeInBytesIncludingMipmaps();
out->writeInt(size);
@@ -117,7 +118,8 @@ void Image::read(DataInputStream* in)
// Read image data if any
if(in->readInt()){
if(in->readBool())
{
unsigned int dataSize = (unsigned int)in->readInt();
//static int totalSize = 0;