From: ribes Date: Mon, 25 Jan 2010 14:35:13 +0000 (+0000) Subject: - Bug in check time duration X-Git-Tag: PARAVIS_29012010~4 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=6bc219a0b403d086340c6cb39d25681702d0c92d;p=modules%2Fkernel.git - Bug in check time duration --- diff --git a/src/Launcher/Launcher_Job.cxx b/src/Launcher/Launcher_Job.cxx index d8538594a..51f5d18cd 100644 --- a/src/Launcher/Launcher_Job.cxx +++ b/src/Launcher/Launcher_Job.cxx @@ -284,10 +284,12 @@ Launcher::Job::checkMaximumDuration(const std::string & maximum_duration) { std::string result(""); std::string edt_value = maximum_duration; + std::size_t pos = edt_value.find(":"); + if (edt_value != "") { - std::string begin_edt_value = edt_value.substr(0, 2); - std::string mid_edt_value = edt_value.substr(2, 1); - std::string end_edt_value = edt_value.substr(3); + std::string begin_edt_value = edt_value.substr(0, pos); + std::string mid_edt_value = edt_value.substr(pos, 1); + std::string end_edt_value = edt_value.substr(pos + 1, edt_value.npos); long value; std::istringstream iss(begin_edt_value);