diff --git a/Common/onelab.h b/Common/onelab.h index 1165e9d6f09629c7f56472fd6c97f4d1a480839f..5c8065803a1b1557a0de19bfa3c3851d5b1b0603 100644 --- a/Common/onelab.h +++ b/Common/onelab.h @@ -148,7 +148,7 @@ namespace onelab{ std::string::size_type last = msg.find_first_of(separator, first); std::string next(""); if(last == std::string::npos){ - next = msg.substr(first, last - first); + next = msg.substr(first); first = last; } else if(first == last){ diff --git a/utils/solvers/c++/onelab.h b/utils/solvers/c++/onelab.h index 80742674aa021056dfb26269db6fa1ab71b2b575..5c8065803a1b1557a0de19bfa3c3851d5b1b0603 100644 --- a/utils/solvers/c++/onelab.h +++ b/utils/solvers/c++/onelab.h @@ -146,7 +146,7 @@ namespace onelab{ { if(first == std::string::npos) return ""; std::string::size_type last = msg.find_first_of(separator, first); - std::string next; + std::string next(""); if(last == std::string::npos){ next = msg.substr(first); first = last;