Skip to content

Commit

Permalink
fix bug in boinc::fscanf()
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
davidpanderson committed Nov 20, 2023
1 parent 41be636 commit 73d23fd
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion lib/boinc_stdio.h
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,6 @@ namespace boinc {
inline int fscanf(FILE *fp, const char *format, ...) {
char buf[BUFSIZ];
boinc::fgets(buf,BUFSIZ,fp);
buf[strlen(buf)-1]=0;
va_list va;
va_start(va, format);
int i=::vsscanf(buf,format,va);
Expand Down

0 comments on commit 73d23fd

Please sign in to comment.