From f92651a336d4e779619acc3c89277b4a6f08b9ef Mon Sep 17 00:00:00 2001 From: David Anderson Date: Thu, 13 Aug 2015 17:33:40 -0700 Subject: [PATCH] client: if app reports fraction done outside 0..1, truncate --- client/app_control.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/client/app_control.cpp b/client/app_control.cpp index 02a5446691..b40f07a606 100644 --- a/client/app_control.cpp +++ b/client/app_control.cpp @@ -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, "", 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.