From 85cc12b6fae31e8f2d7014c5061c915c036d9369 Mon Sep 17 00:00:00 2001 From: pixel Date: Thu, 27 Nov 2003 12:40:44 +0000 Subject: Buffer fix --- lib/Buffer.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/Buffer.cc') diff --git a/lib/Buffer.cc b/lib/Buffer.cc index d0e5af2..18eb814 100644 --- a/lib/Buffer.cc +++ b/lib/Buffer.cc @@ -110,7 +110,7 @@ Byte & Buffer::operator[](size_t p) { } if (p >= realsiz) { memset(buffer + realsiz, 0, p - realsiz); - realsiz = p; + realsiz = p + 1; } if (seekable) { @@ -139,7 +139,7 @@ off_t Buffer::seek(off_t off, int wheel) throw (GeneralException) { ptr = realsiz + off; break; } - operator[](ptr) = operator[](ptr); + operator[](ptr); return ptr; } -- cgit v1.2.3