- wrapper: fix fraction done feature

svn path=/trunk/boinc/; revision=19231
This commit is contained in:
David Anderson 2009-10-02 18:48:50 +00:00
parent b817b8ed7a
commit 12dc1852a7
2 changed files with 7 additions and 1 deletions

View File

@ -8335,3 +8335,9 @@ David 2 Oct 2009
util_ops.inc util_ops.inc
ops/ ops/
(most).php (most).php
David 2 Oct 2009
- wrapper: fix fraction done feature
samples/wrapper/
wrapper.cpp

View File

@ -112,7 +112,7 @@ struct TASK {
FILE* f = fopen(fraction_done_filename.c_str(), "r"); FILE* f = fopen(fraction_done_filename.c_str(), "r");
if (!f) return 0; if (!f) return 0;
double frac; double frac;
int n = fscanf(f, "%f", &frac); int n = fscanf(f, "%lf", &frac);
fclose(f); fclose(f);
if (n != 1) return 0; if (n != 1) return 0;
if (frac < 0) return 0; if (frac < 0) return 0;