--- trunk/tntnet/dynamic/common.h 2007/11/28 21:02:21 87 +++ trunk/tntnet/dynamic/common.h 2007/11/28 21:56:39 88 @@ -19,7 +19,7 @@ inline std::string ltrim(const std::string& input) { std::string output = input; - while ( ! isgraph(output[0])) + while ( output.size()>0 && !isgraph(output[0])) output.erase(0,1); return output; } @@ -27,7 +27,7 @@ inline std::string rtrim(const std::string& input) { std::string output = input; - while (! isgraph(output[output.size()-1])) + while ( output.size()>0 && !isgraph(output[output.size()-1])) output.erase(output.size()-1,1); return output; }