diff --git a/src/osgPlugins/ive/DataInputStream.cpp b/src/osgPlugins/ive/DataInputStream.cpp index 1a08397bb..f23cdf5b0 100644 --- a/src/osgPlugins/ive/DataInputStream.cpp +++ b/src/osgPlugins/ive/DataInputStream.cpp @@ -84,6 +84,8 @@ #include #include +#include + using namespace ive; using namespace std; @@ -199,10 +201,10 @@ unsigned int DataInputStream::readUInt(){ if (_istream->rdstate() & _istream->failbit) throw Exception("DataInputStream::readUInt(): Failed to read unsigned int value."); - if (_verboseOutput) std::cout<<"read/writeUInt() ["<rdstate() & _istream->failbit) // throw Exception("DataInputStream::readInt(): Failed to read int value."); - if (_verboseOutput) std::cout<<"read/writeInt() ["<rdstate() & _istream->failbit) throw Exception("DataInputStream::readFloat(): Failed to read float value."); - if (_verboseOutput) std::cout<<"read/writeFloat() ["<rdstate() & _istream->failbit) throw Exception("DataInputStream::readLong(): Failed to read long value."); - if (_verboseOutput) std::cout<<"read/writeLong() ["<rdstate() & _istream->failbit) throw Exception("DataInputStream::readULong(): Failed to read unsigned long value."); + if (_byteswap) osg::swapBytes((char *)&l,LONGSIZE) ; + if (_verboseOutput) std::cout<<"read/writeULong() ["<rdstate() & _istream->failbit) throw Exception("DataInputStream::readDouble(): Failed to read double value."); - if (_verboseOutput) std::cout<<"read/writeDouble() ["<