Merge pull request #175 from pete4abw/head_off_always_0

get_fileinfo always shows 0 file offset
This commit is contained in:
Con Kolivas 2020-11-15 16:22:52 +11:00 committed by GitHub
commit f9217bf7b8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1061,7 +1061,7 @@ next_chunk:
second_last = last_head;
if (unlikely(last_head + ofs > infile_size))
failure_goto(("Offset greater than archive size, likely corrupted/truncated archive.\n"), error);
if (unlikely(head_off = lseek(fd_in, last_head + ofs, SEEK_SET) == -1))
if (unlikely((head_off = lseek(fd_in, last_head + ofs, SEEK_SET)) == -1))
fatal_goto(("Failed to seek to header data in get_fileinfo\n"), error);
if (unlikely(!get_header_info(control, fd_in, &ctype, &c_len, &u_len,
&last_head, chunk_byte)))