summaryrefslogtreecommitdiffstats
path: root/src/ui/edit.cpp
diff options
context:
space:
mode:
authorkrzys-h <krzys_h@interia.pl>2013-12-27 10:50:52 +0100
committerkrzys-h <krzys_h@interia.pl>2013-12-27 10:50:52 +0100
commit8b5b2eeaa152129dd23a9c127bd59ec260956c42 (patch)
treea6bdaf172c037cfe93b139fa88d03a7e589e47f9 /src/ui/edit.cpp
parent3b1efc6558a7524bdcaca3232c377444aa43ce19 (diff)
downloadcolobot-8b5b2eeaa152129dd23a9c127bd59ec260956c42.tar.gz
colobot-8b5b2eeaa152129dd23a9c127bd59ec260956c42.tar.bz2
colobot-8b5b2eeaa152129dd23a9c127bd59ec260956c42.zip
Added error message when CEdit is unable to read a file
Diffstat (limited to 'src/ui/edit.cpp')
-rw-r--r--src/ui/edit.cpp5
1 files changed, 4 insertions, 1 deletions
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);