client: if app reports fraction done outside 0..1, truncate

This commit is contained in:
David Anderson 2015-08-13 17:33:40 -07:00
parent 5e90e95ada
commit f92651a336
1 changed files with 2 additions and 0 deletions

View File

@ -1370,6 +1370,8 @@ bool ACTIVE_TASK::get_app_status_msg() {
want_network = 0;
current_cpu_time = checkpoint_cpu_time = 0.0;
if (parse_double(msg_buf, "<fraction_done>", fd)) {
if (fd < 0) fd = 0;
if (fd > 1) fd = 1;
// fraction_done will be reported as zero
// until the app's first call to boinc_fraction_done().
// So ignore zeros.