mirror of
https://github.com/ckolivas/lrzip.git
synced 2026-04-04 13:57:40 +00:00
Fix file size recording in the magic header when stdin is used.
This commit is contained in:
parent
43dd72b9e1
commit
232b268367
3 changed files with 30 additions and 15 deletions
2
main.c
2
main.c
|
|
@ -69,7 +69,7 @@ static void write_magic(int fd_in, int fd_out)
|
|||
if (fstat(fd_in, &st) != 0)
|
||||
fatal("bad magic file descriptor!?\n");
|
||||
|
||||
memcpy(&magic[6], &st.st_size, 8);
|
||||
memcpy(&magic[6], &control.st_size, 8);
|
||||
|
||||
/* save LZMA compression flags */
|
||||
if (LZMA_COMPRESS(control.flags)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue