From 5d1b5d5dce5c0c8e22486d1a78a950c8c812b6f1 Mon Sep 17 00:00:00 2001
From: deuce <>
Date: Mon, 8 Dec 2003 23:19:41 +0000
Subject: [PATCH] Stop reading when the end of file is reached.  :-)

---
 src/sbbs3/install/sbbsinst.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/sbbs3/install/sbbsinst.c b/src/sbbs3/install/sbbsinst.c
index c31eecb130..4f775de5d6 100644
--- a/src/sbbs3/install/sbbsinst.c
+++ b/src/sbbs3/install/sbbsinst.c
@@ -616,7 +616,7 @@ void install_sbbs(dist_t *dist,struct server_ent_t *server)  {
 				}
 				printf("Downloading %s           ",url);
 				offset=0;
-				while((ret1=read(remote,buf,sizeof(buf)))>=0)  {
+				while((ret1=read(remote,buf,sizeof(buf)))>0)  {
 					ret2=write(fout,buf,ret1);
 					if(ret2!=ret1)  {
 						printf("\n!ERROR %d writing to %s\n",errno,dstfname);
-- 
GitLab