commit 0623bdc3978eb327390c15de16deb991299e8b31
parent fee669cbaa9c842d18ed53838ea84b05335e40bc
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Sat, 25 Oct 2014 10:22:51 +0000
fix readfd check, below case !r was never executed
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sob.c b/sob.c
@@ -621,7 +621,7 @@ pipe_read(int fd_in, int fd_out, char *writestr,
if(FD_ISSET(fd_in, &fdr) && haswritten) {
while(1) {
- if((r = readfd(fd_in, buf, sizeof(buf))) <= 0)
+ if((r = readfd(fd_in, buf, sizeof(buf))) == -1)
goto fini;
if(!r) {
status = 0;