fix bug in boinc::fscanf()

This was reading a line with fgets(),
then removing the last character from it
(usually but not necessarily a newline).
This is incorrect.
It broke the logic for checking .md5 files
(which look for the newline)
This commit is contained in:
David Anderson 2023-11-20 12:56:18 -08:00
parent 41be636349
commit 73d23fdcd7
1 changed files with 0 additions and 1 deletions

View File

@ -183,7 +183,6 @@ namespace boinc {
inline int fscanf(FILE *fp, const char *format, ...) { inline int fscanf(FILE *fp, const char *format, ...) {
char buf[BUFSIZ]; char buf[BUFSIZ];
boinc::fgets(buf,BUFSIZ,fp); boinc::fgets(buf,BUFSIZ,fp);
buf[strlen(buf)-1]=0;
va_list va; va_list va;
va_start(va, format); va_start(va, format);
int i=::vsscanf(buf,format,va); int i=::vsscanf(buf,format,va);