diff --git a/src/App.cpp b/src/App.cpp index 144b319..2e8cd7f 100644 --- a/src/App.cpp +++ b/src/App.cpp @@ -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); }