Fix file position update
authorRémi Denis-Courmont <rem@videolan.org>
Mon, 26 Nov 2007 21:01:13 +0000 (21:01 +0000)
committerRémi Denis-Courmont <rem@videolan.org>
Mon, 26 Nov 2007 21:01:13 +0000 (21:01 +0000)
modules/access/file.c

index bd76d86..616f31d 100644 (file)
@@ -394,7 +394,7 @@ static block_t *mmapBlock (access_t *p_access)
         return NULL;
     }
 
-    p_access->info.i_pos += length;
+    p_access->info.i_pos = offset + length;
 
     msg_Dbg (p_access, "mapped %lu bytes at %p from offset %lu",
              (unsigned long)length, addr, (unsigned long)offset);