diff options
Diffstat (limited to 'c++-qt/src')
-rw-r--r-- | c++-qt/src/gatsstream.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/c++-qt/src/gatsstream.cpp b/c++-qt/src/gatsstream.cpp index d32b2b2..ae53d0d 100644 --- a/c++-qt/src/gatsstream.cpp +++ b/c++-qt/src/gatsstream.cpp | |||
@@ -86,15 +86,20 @@ void Gats::GatsStream::writeObject( Gats::Object *pObject ) | |||
86 | pTmp->write( (const char *)&iSize, 4 ); | 86 | pTmp->write( (const char *)&iSize, 4 ); |
87 | pObject->write( *pTmp ); | 87 | pObject->write( *pTmp ); |
88 | iSize = htonl( pTmp->pos() ); | 88 | iSize = htonl( pTmp->pos() ); |
89 | uint64_t iEndPos = pTmp->pos(); | ||
89 | pTmp->seek( iSizePos ); | 90 | pTmp->seek( iSizePos ); |
90 | pTmp->write( (const char *)&iSize, 4 ); | 91 | pTmp->write( (const char *)&iSize, 4 ); |
91 | pTmp->close(); | ||
92 | 92 | ||
93 | if( rStream.isSequential() ) | 93 | if( rStream.isSequential() ) |
94 | { | 94 | { |
95 | pTmp->close(); | ||
95 | rStream.write( ((QBuffer *)pTmp)->data() ); | 96 | rStream.write( ((QBuffer *)pTmp)->data() ); |
96 | delete pTmp; | 97 | delete pTmp; |
97 | } | 98 | } |
99 | else | ||
100 | { | ||
101 | pTmp->seek( iSizePos ); | ||
102 | } | ||
98 | } | 103 | } |
99 | 104 | ||
100 | bool Gats::GatsStream::skipReadNulls() | 105 | bool Gats::GatsStream::skipReadNulls() |