aboutsummaryrefslogtreecommitdiff
path: root/editors
diff options
context:
space:
mode:
Diffstat (limited to 'editors')
-rw-r--r--editors/diff.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/editors/diff.c b/editors/diff.c
index a78a0ee28..c3ad31bf3 100644
--- a/editors/diff.c
+++ b/editors/diff.c
@@ -740,9 +740,10 @@ static int diffreg(char *file[2])
740 unlink(name); 740 unlink(name);
741 if (bb_copyfd_eof(fd, fd_tmp) < 0) 741 if (bb_copyfd_eof(fd, fd_tmp) < 0)
742 xfunc_die(); 742 xfunc_die();
743 if (fd) /* Prevents closing of stdin */ 743 if (fd != STDIN_FILENO)
744 close(fd); 744 close(fd);
745 fd = fd_tmp; 745 fd = fd_tmp;
746 xlseek(fd, 0, SEEK_SET);
746 } 747 }
747 fp[i] = fdopen(fd, "r"); 748 fp[i] = fdopen(fd, "r");
748 } 749 }