From 7b159cecc50ea853bcfc7c9c45dfa437fbef66b4 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Sun, 10 May 2020 15:57:52 +0000 Subject: [PATCH] fsutil: Fix writing end-of-archive marker. This code was supposed to write two sectors but instead it wrote the same sector twice. Thanks to Grant A Shurtz for reporting this bug. --- src/filesys/fsutil.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/filesys/fsutil.c b/src/filesys/fsutil.c index 5f045d6..df632df 100644 --- a/src/filesys/fsutil.c +++ b/src/filesys/fsutil.c @@ -215,7 +215,7 @@ fsutil_append (char **argv) them, though, in case we have more files to append. */ memset (buffer, 0, BLOCK_SECTOR_SIZE); block_write (dst, sector, buffer); - block_write (dst, sector, buffer + 1); + block_write (dst, sector + 1, buffer); /* Finish up. */ file_close (src); -- 2.30.2