diff options
author | Thomas Roessler <roessler@does-not-exist.org> | 2002-04-29 17:12:00 +0000 |
---|---|---|
committer | Thomas Roessler <roessler@does-not-exist.org> | 2002-04-29 17:12:00 +0000 |
commit | 17ecedd391d8bdb019c949a18d4a09895b1302dd (patch) | |
tree | 3f5ff5ceee7c69d2bcc4224d0e09a4cf7af88550 /lib.c | |
parent | b15772057ed7fb5275b31ab170e0cbe8c358a951 (diff) |
Fix #1171.
Diffstat (limited to 'lib.c')
-rw-r--r-- | lib.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -183,8 +183,8 @@ void mutt_unlink (const char *s) memset (buf, 0, sizeof (buf)); while (sb.st_size > 0) { - fwrite (buf, 1, sizeof (buf), f); - sb.st_size -= sizeof (buf); + fwrite (buf, 1, MIN (sizeof (buf), sb.st_size), f); + sb.st_size -= MIN (sizeof (buf), sb.st_size); } fclose (f); } |