Allow -1 characters while reading a file
This commit is contained in:
parent
ca98f9742b
commit
48bb561c17
@ -298,7 +298,8 @@ static std::string read_whole_file(std::ifstream& file)
|
|||||||
while(file.good())
|
while(file.good())
|
||||||
{
|
{
|
||||||
char ch = file.get();
|
char ch = file.get();
|
||||||
if(ch != -1) result.push_back(ch);
|
if(!file.good()) break;
|
||||||
|
result.push_back(ch);
|
||||||
}
|
}
|
||||||
return std::move(result);
|
return std::move(result);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user