From c9446183b5180c2fe9e6d87fbedc98b15e0c47ac Mon Sep 17 00:00:00 2001 From: Lefteris Karapetsas Date: Mon, 12 Jan 2015 15:29:44 +0100 Subject: Fixing bug where empty tagless docstring in Natspec would result in infinite loop --- InterfaceHandler.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'InterfaceHandler.cpp') diff --git a/InterfaceHandler.cpp b/InterfaceHandler.cpp index 4ce6e989..a5c6f4a1 100644 --- a/InterfaceHandler.cpp +++ b/InterfaceHandler.cpp @@ -349,8 +349,13 @@ void InterfaceHandler::parseDocString(std::string const& _string, CommentOwner _ } else if (m_lastTag != DocTagType::NONE) // continuation of the previous tag currPos = appendDocTag(currPos, end, _owner); - else if (currPos != end) // skip the line if a newline was found + else if (currPos != end) + { + if (nlPos == end) //end of text + return; + // else skip the line if a newline was found currPos = nlPos + 1; + } } } -- cgit v1.2.3