Skip to content
Snippets Groups Projects
Commit 5d1b5d5d authored by deuce's avatar deuce
Browse files

Stop reading when the end of file is reached. :-)

parent f937e68d
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment