Explorar el Código

Use lfs_file_rawsize to calculate LFS_SEEK_END position

Themba Dube hace 5 años
padre
commit
3216b07c3b
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      lfs.c

+ 1 - 1
lfs.c

@@ -3055,7 +3055,7 @@ static lfs_soff_t lfs_file_rawseek(lfs_t *lfs, lfs_file_t *file,
     } else if (whence == LFS_SEEK_CUR) {
         npos = file->pos + off;
     } else if (whence == LFS_SEEK_END) {
-        npos = file->ctz.size + off;
+        npos = lfs_file_rawsize(lfs, file) + off;
     }
 
     if (npos > lfs->file_max) {