mirror of https://github.com/BOINC/boinc.git
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:
parent
41be636349
commit
73d23fdcd7
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue