Skip to content

Commit

Permalink
Make sure line is initialized to 0.
Browse files Browse the repository at this point in the history
  • Loading branch information
abellgithub committed Mar 22, 2018
1 parent 7f52787 commit 6616131
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions io/TextReader.cpp
Expand Up @@ -90,6 +90,7 @@ QuickInfo TextReader::inspect()

void TextReader::checkHeader(const std::string& header)
{
std::cerr << "Header = " << header << "!\n";
auto it = std::find_if(header.begin(), header.end(),
[](char c){ return std::isalpha(c); });
if (it == header.end())
Expand Down Expand Up @@ -130,6 +131,7 @@ void TextReader::initialize(PointTableRef table)
if (!m_istream)
throwError("Unable to open text file '" + m_filename + "'.");

m_line = 0;
// Skip lines requested.
std::string dummy;
for (size_t i = 0; i < m_skip; ++i)
Expand Down

0 comments on commit 6616131

Please sign in to comment.