From c514293b7ff3f31cf0019bdd9c454db0185966c3 Mon Sep 17 00:00:00 2001 From: Pavel Charvat Date: Thu, 29 Mar 2012 21:45:24 +0200 Subject: [PATCH] Fastbufs: Fixed broken seeking in fbbuf. --- ucw/fb-buffer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ucw/fb-buffer.c b/ucw/fb-buffer.c index 8e87d39d..9fc92277 100644 --- a/ucw/fb-buffer.c +++ b/ucw/fb-buffer.c @@ -31,8 +31,8 @@ fbbuf_seek(struct fastbuf *f, ucw_off_t pos, int whence) if (pos < 0 || pos > len) bthrow(f, "seek", "Seek out of range"); f->bptr = f->buffer + pos; - f->bstop = f->buffer; - f->pos = 0; + f->bstop = f->bufend; + f->pos = len; return 1; } -- 2.39.5