From 379a2307657dcf52c2fb79c0919b9aed694b6cd7 Mon Sep 17 00:00:00 2001 From: Username404 Date: Wed, 29 Dec 2021 19:19:23 +0100 Subject: [PATCH] Check whether failbit or badbit are set in filefuncs.cpp --- src/etc/filefuncs.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/etc/filefuncs.cpp b/src/etc/filefuncs.cpp index c33cba1..b7f44f7 100644 --- a/src/etc/filefuncs.cpp +++ b/src/etc/filefuncs.cpp @@ -6,7 +6,7 @@ using namespace std; string getFileContent(const string& file) { ifstream fileStream(file, ios::in); - if (not fileStream.fail()) { + if (fileStream) { string lineinput, fullinput; while (getline(fileStream, lineinput)) { fullinput.append(lineinput += '\n');