changeset 2983:c20a64efd608 HEAD

Added assert.
author Timo Sirainen <tss@iki.fi>
date Thu, 16 Dec 2004 03:37:20 +0200
parents 3dedde6646c5
children 3fb1808e7bff
files src/lib/istream-limit.c
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib/istream-limit.c	Thu Dec 16 03:37:14 2004 +0200
+++ b/src/lib/istream-limit.c	Thu Dec 16 03:37:20 2004 +0200
@@ -80,6 +80,10 @@
 
 static void _seek(struct _istream *stream, uoff_t v_offset)
 {
+	struct limit_istream *lstream = (struct limit_istream *) stream;
+
+	i_assert(v_offset <= lstream->v_size);
+
 	stream->istream.stream_errno = 0;
 	stream->istream.v_offset = v_offset;
 	stream->skip = stream->pos = 0;