diff options
Diffstat (limited to 'editors/diff.c')
-rw-r--r-- | editors/diff.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/editors/diff.c b/editors/diff.c index a78a0ee..c3ad31b 100644 --- a/editors/diff.c +++ b/editors/diff.c @@ -740,9 +740,10 @@ static int diffreg(char *file[2]) unlink(name); if (bb_copyfd_eof(fd, fd_tmp) < 0) xfunc_die(); - if (fd) /* Prevents closing of stdin */ + if (fd != STDIN_FILENO) close(fd); fd = fd_tmp; + xlseek(fd, 0, SEEK_SET); } fp[i] = fdopen(fd, "r"); } |