Fixed readLine() getting stuck at the end of the file.
This commit is contained in:
parent
6ebcb96444
commit
4735fc10f8
@ -240,7 +240,7 @@ StreamError Stream::readLine(std::string& outString)
|
|||||||
|
|
||||||
outString.clear();
|
outString.clear();
|
||||||
bool done = false;
|
bool done = false;
|
||||||
while(!done)
|
while (!done)
|
||||||
{
|
{
|
||||||
// read into the buffer
|
// read into the buffer
|
||||||
std::size_t bytesRead = 0;
|
std::size_t bytesRead = 0;
|
||||||
@ -270,6 +270,11 @@ StreamError Stream::readLine(std::string& outString)
|
|||||||
{
|
{
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (isAtEnd())
|
||||||
|
{
|
||||||
|
done = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return StreamError::SUCCESS;
|
return StreamError::SUCCESS;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user