Skip to content

Commit

Permalink
Terminate with newline
Browse files Browse the repository at this point in the history
  • Loading branch information
SylvainCorlay committed Dec 12, 2018
1 parent ec32f5e commit 3f52cb9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/xbuffer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ namespace xcpp
int underflow() override
{
m_callback(m_value);
// null-terminate the string to trigger parsing.
m_value += '\0';
// Terminate the string to trigger parsing.
m_value += '\n';
char* data = const_cast<char*>(m_value.data());
setg(data, data, data + m_value.size());
return traits_type::to_int_type(*gptr());
Expand Down

0 comments on commit 3f52cb9

Please sign in to comment.