Skip to content
Snippets Groups Projects
Commit 95d12fc6 authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

In XModem/YModem, when total_files reaches zero, stop downloading.

parent 1c4231e8
No related branches found
No related tags found
No related merge requests found
...@@ -1838,7 +1838,8 @@ void xmodem_download(struct bbslist *bbs, long mode, char *path) ...@@ -1838,7 +1838,8 @@ void xmodem_download(struct bbslist *bbs, long mode, char *path)
break; break;
if((cps=(unsigned)(file_bytes/t))==0) if((cps=(unsigned)(file_bytes/t))==0)
cps=1; cps=1;
total_files--; if (--total_files <= 0)
break;
total_bytes-=file_bytes; total_bytes-=file_bytes;
if(total_files>1 && total_bytes) if(total_files>1 && total_bytes)
lprintf(LOG_INFO,"Remaining - Time: %lu:%02lu Files: %u KBytes: %"PRId64 lprintf(LOG_INFO,"Remaining - Time: %lu:%02lu Files: %u KBytes: %"PRId64
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment