Merge pull request #562 from redboltz/fix_561

Fixed #561
This commit is contained in:
Takatoshi Kondo 2017-02-04 12:45:51 +09:00 committed by GitHub
commit 303c1000c2

View File

@ -839,7 +839,7 @@ template <typename VisitorHolder, typename ReferencedBufferHook>
inline void parser<VisitorHolder, ReferencedBufferHook>::expand_buffer(std::size_t size)
{
if(m_used == m_off && detail::get_count(m_buffer) == 1
&& static_cast<VisitorHolder&>(*this).visitor().referenced()) {
&& !static_cast<VisitorHolder&>(*this).visitor().referenced()) {
// rewind buffer
m_free += m_used - COUNTER_SIZE;
m_used = COUNTER_SIZE;