diff options
-rw-r--r-- | lib/Buffer.cc | 4 |
1 files changed, 2 insertions, 2 deletions
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; } |