mirror of
https://github.com/vivier/EMILE.git
synced 2024-10-31 20:05:01 +00:00
correct offset management
This commit is contained in:
parent
b4ea46f60e
commit
2d3fab4f22
@ -20,7 +20,7 @@ int iso9660_lseek(iso9660_FILE *file, long offset, int whence)
|
||||
new_offset = offset;
|
||||
break;
|
||||
case SEEK_CUR:
|
||||
new_offset += offset;
|
||||
new_offset = file->offset + offset;
|
||||
break;
|
||||
case SEEK_END:
|
||||
new_offset = file->size + offset;
|
||||
@ -32,7 +32,7 @@ int iso9660_lseek(iso9660_FILE *file, long offset, int whence)
|
||||
if ( (new_offset < 0) || (new_offset > file->size) )
|
||||
return -1;
|
||||
|
||||
file->offset = offset;
|
||||
file->offset = new_offset;
|
||||
|
||||
return offset;
|
||||
return new_offset;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user