Fixing bug where empty tagless docstring in Natspec would result in infinite loop

This commit is contained in:
Lefteris Karapetsas 2015-01-12 15:29:44 +01:00
parent 94cff9684f
commit c9446183b5

View File

@ -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;
}
}
}