diff options
author | Lefteris Karapetsas <lefteris@refu.co> | 2015-01-12 22:29:44 +0800 |
---|---|---|
committer | Lefteris Karapetsas <lefteris@refu.co> | 2015-01-12 22:29:44 +0800 |
commit | c9446183b5180c2fe9e6d87fbedc98b15e0c47ac (patch) | |
tree | 7d69ca95af493d5dfa8a89b1a0afb33bb1546c64 /InterfaceHandler.cpp | |
parent | 94cff9684f8b1d4a5e2eeba58444a99e32e8a7ae (diff) | |
download | dexon-solidity-c9446183b5180c2fe9e6d87fbedc98b15e0c47ac.tar.gz dexon-solidity-c9446183b5180c2fe9e6d87fbedc98b15e0c47ac.tar.zst dexon-solidity-c9446183b5180c2fe9e6d87fbedc98b15e0c47ac.zip |
Fixing bug where empty tagless docstring in Natspec would result in infinite loop
Diffstat (limited to 'InterfaceHandler.cpp')
-rw-r--r-- | InterfaceHandler.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
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; + } } } |