From ab956ea59f59e0af09526e1df717cbda81c3ac9a Mon Sep 17 00:00:00 2001 From: Christophe Geuzaine <cgeuzaine@ulg.ac.be> Date: Tue, 3 Jan 2012 07:53:50 +0000 Subject: [PATCH] trying to fix #146 --- Common/onelab.h | 1 + 1 file changed, 1 insertion(+) diff --git a/Common/onelab.h b/Common/onelab.h index 32ed153360..275613eb84 100644 --- a/Common/onelab.h +++ b/Common/onelab.h @@ -110,6 +110,7 @@ namespace onelab{ static std::string getNextToken(const std::string &msg, std::string::size_type &first) { + if(first == std::string::npos) return ""; std::string::size_type last = msg.find_first_of(charSep(), first); std::string next = msg.substr(first, last - first); first = (last == std::string::npos) ? last : last + 1; -- GitLab