WSL/SLF GitLab Repository

Commit d241ef95 authored by Mathias Bavay's avatar Mathias Bavay
Browse files

When checking for End Of Line character, the eof flag was not properly reset,...

When checking for End Of Line character, the eof flag was not properly reset, so when testing 1 line files, the subsequent reading would fail.
parent 50eb7f06
......@@ -185,16 +185,16 @@ char IOUtils::getEoln(std::istream& fin)
fin.get(peekc);
chars++;
}
// cout << "Read: " << chars << "characters" << endl;
pbuf = fin.rdbuf();
pbuf->pubseekpos(position); //rewind
//cout << fin.peek();
fin.clear(); //reset eof flag, etc
return tmp;
}
} while ((chars < 3000) && (!fin.eof()));
pbuf = fin.rdbuf();
pbuf->pubseekpos(position); //rewind
fin.clear(); //reset eof flag, etc
return '\n';
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment