From 8b5b2eeaa152129dd23a9c127bd59ec260956c42 Mon Sep 17 00:00:00 2001 From: krzys-h Date: Fri, 27 Dec 2013 10:50:52 +0100 Subject: Added error message when CEdit is unable to read a file --- src/ui/edit.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/ui/edit.cpp') diff --git a/src/ui/edit.cpp b/src/ui/edit.cpp index 271a8e7..67ed6a1 100644 --- a/src/ui/edit.cpp +++ b/src/ui/edit.cpp @@ -1466,7 +1466,10 @@ bool CEdit::ReadText(std::string filename, int addSize) } file = fopen(fs::path(path).make_preferred().string().c_str(), "rb"); - if ( file == NULL ) return false; + if ( file == NULL ) { + CLogger::GetInstancePointer()->Error("Unable to read text from file \"%s\"\n", path.c_str()); + return false; + } fseek(file, 0, SEEK_END); len = ftell(file); -- cgit v1.2.3-1-g7c22