diff --git a/src/osgPlugins/txp/trpage_io.h b/src/osgPlugins/txp/trpage_io.h index 44e19e39e..31eef9725 100644 --- a/src/osgPlugins/txp/trpage_io.h +++ b/src/osgPlugins/txp/trpage_io.h @@ -579,7 +579,7 @@ public: trpgrAppFile(trpgEndian,const char *); virtual ~trpgrAppFile(void); virtual bool Read(trpgMemReadBuffer *,int32 offset); - virtual bool Read(char *data,int32 offset,int32 dataSize); + virtual bool Read(char *data,int32 offset,uint32 dataSize); bool isValid(void) const; protected: diff --git a/src/osgPlugins/txp/trpage_readbuf.cpp b/src/osgPlugins/txp/trpage_readbuf.cpp index 1e5760204..f68467535 100644 --- a/src/osgPlugins/txp/trpage_readbuf.cpp +++ b/src/osgPlugins/txp/trpage_readbuf.cpp @@ -469,7 +469,7 @@ bool trpgrAppFile::Read(trpgMemReadBuffer *buf,int32 offset) // Byteswap if necessary if (ness != cpuNess) - trpg_byteswap_int(len); + len = trpg_byteswap_int(len); if (len < 0) { valid = false; @@ -496,7 +496,7 @@ bool trpgrAppFile::Read(trpgMemReadBuffer *buf,int32 offset) check the length against the size of the memory passed into dataSize. */ -bool trpgrAppFile::Read(char *data,int32 offset,int32 dataSize) +bool trpgrAppFile::Read(char *data,int32 offset,uint32 dataSize) { if (!valid) return false; @@ -516,7 +516,7 @@ bool trpgrAppFile::Read(char *data,int32 offset,int32 dataSize) // Byteswap if necessary if (ness != cpuNess) - trpg_byteswap_int(len); + len = trpg_byteswap_int(len); if (len < 0) { valid = false;