From e14d63eca8dfce48d55049718555d83bb5dd86db Mon Sep 17 00:00:00 2001 From: Dwayne Boone Date: Thu, 21 Jan 2010 11:47:15 -0330 Subject: Bug 4642 - slice2py hang --- cpp/src/Slice/PythonUtil.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'cpp/src/Slice/PythonUtil.cpp') diff --git a/cpp/src/Slice/PythonUtil.cpp b/cpp/src/Slice/PythonUtil.cpp index c9b4d7af4c2..f4e23f6493c 100644 --- a/cpp/src/Slice/PythonUtil.cpp +++ b/cpp/src/Slice/PythonUtil.cpp @@ -1999,10 +1999,11 @@ Slice::Python::CodeVisitor::editComment(const string& comment) if(pos != string::npos) { string::size_type endpos = result.find('>', pos); - if(endpos != string::npos) + if(endpos == string::npos) { - result.erase(pos, endpos - pos + 1); + break; } + result.erase(pos, endpos - pos + 1); } } while(pos != string::npos); -- cgit v1.2.3