]> git.draconx.ca Git - liblbx.git/commitdiff
liblbx: Set the file offset in lbx_file_seek.
authorNick Bowler <nbowler@draconx.ca>
Mon, 8 Feb 2010 01:19:31 +0000 (20:19 -0500)
committerNick Bowler <nbowler@draconx.ca>
Mon, 8 Feb 2010 17:00:55 +0000 (12:00 -0500)
This function previously would do the underlying seek correctly, but not
actually record what it did.  This breaks lots of things, fix it.

src/lbx.c

index 17bf9769f0a670d938b67ed516e0043574543a25..c2db14636d6a1e3fc93b05f97c087f42cb3f59a5 100644 (file)
--- a/src/lbx.c
+++ b/src/lbx.c
@@ -293,6 +293,8 @@ int lbx_file_seek(struct lbx_file_state *f, long offset, int whence)
        f->lbx->last_file = NULL;
        if (fops->seek(f->lbx->f, f->base + pos, SEEK_SET) != 0)
                return -1;
+
+       f->offset = pos;
        f->lbx->last_file = f;
        f->eof = 0;