Commit 94fccbe0 authored by ElenaSubbotina's avatar ElenaSubbotina Committed by Alexander Trofimov

.

parent e12f544b
......@@ -27,7 +27,7 @@ public:
{
unsigned short rdUShort = 0;
if ( (stream != NULL) && (position + 2 < stream->size()))
if ( stream != NULL )
{
stream->seek( position );
stream->read((unsigned char*)(&rdUShort), sizeof( rdUShort ));
......@@ -42,7 +42,7 @@ public:
{
short rdShort = 0;
if ( (stream != NULL) && (position + 2 < stream->size()))
if ( stream != NULL )
{
stream->seek( position );
stream->read((unsigned char*)(&rdShort), sizeof( rdShort ));
......@@ -57,7 +57,7 @@ public:
{
int rdInt = 0;
if ( (stream != NULL) && (position + 4 < stream->size()))
if ( stream != NULL )
{
stream->seek( position );
stream->read( (unsigned char*) &rdInt, sizeof( rdInt ) );
......@@ -72,7 +72,7 @@ public:
{
int rdUInt = 0;
if ( (stream != NULL) && (position + 4 < stream->size()))
if ( stream != NULL )
{
stream->seek( position );
stream->read((unsigned char*) &rdUInt, sizeof( rdUInt ) );
......@@ -87,7 +87,7 @@ public:
{
unsigned char rdByte = 0;
if ( (stream != NULL) && (position + 1 < stream->size()))
if ( this->stream != NULL )
{
stream->seek( position);
stream->read( (unsigned char*)&rdByte, sizeof( rdByte ) );
......@@ -102,7 +102,8 @@ public:
{
unsigned char *rdBytes = NULL;
if ( ( stream != NULL ) && ( count > 0 ))
if ( ( stream != NULL ) && ( count > 0 ) && isResultNeeded )
{
rdBytes = new unsigned char[count];
......@@ -114,6 +115,10 @@ public:
position += sizeof( unsigned char )*count;
}
}
else
{
position += sizeof( unsigned char )*count;
}
return rdBytes;
}
......@@ -221,6 +226,7 @@ public:
private:
POLE::uint64 position;
POLE::uint64 position;
//std::streampos position;
POLE::Stream* stream;
};
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment