From: Pavel Charvat Date: Thu, 29 Mar 2012 19:45:24 +0000 (+0200) Subject: Fastbufs: Fixed broken seeking in fbbuf. X-Git-Tag: v5.99~182 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=c514293b7ff3f31cf0019bdd9c454db0185966c3;p=libucw.git Fastbufs: Fixed broken seeking in fbbuf. --- 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; }