summaryrefslogtreecommitdiffstats
path: root/src/tools/ntqvaluelist.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/ntqvaluelist.h')
-rw-r--r--src/tools/ntqvaluelist.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/tools/ntqvaluelist.h b/src/tools/ntqvaluelist.h
index b9fc73098..24a9cfc57 100644
--- a/src/tools/ntqvaluelist.h
+++ b/src/tools/ntqvaluelist.h
@@ -655,13 +655,11 @@ Q_INLINE_TEMPLATES TQDataStream& operator>>( TQDataStream& s, TQValueList<T>& l
l.clear();
TQ_UINT32 c;
s >> c;
- for( TQ_UINT32 i = 0; i < c; ++i )
+ for( TQ_UINT32 i = 0; i < c && !s.atEnd(); ++i )
{
T t;
s >> t;
l.append( t );
- if ( s.atEnd() )
- break;
}
return s;
}