Allow -1 characters while reading a file

This commit is contained in:
apio 2022-11-04 20:16:11 +01:00
parent ca98f9742b
commit 48bb561c17

View File

@ -298,7 +298,8 @@ static std::string read_whole_file(std::ifstream& file)
while(file.good())
{
char ch = file.get();
if(ch != -1) result.push_back(ch);
if(!file.good()) break;
result.push_back(ch);
}
return std::move(result);
}