diff options
author | archshift <admin@archshift.com> | 2014-04-26 05:49:55 +0200 |
---|---|---|
committer | archshift <admin@archshift.com> | 2014-04-26 05:49:55 +0200 |
commit | 80b97fd9dd584c439ca25efaa7e5172da1509628 (patch) | |
tree | d3485e1309f225c35da7d78744cd42f2896c1216 /src/OSSupport/File.cpp | |
parent | Moved switch{} out of GetArmorCoverAgainst(). (diff) | |
download | cuberite-80b97fd9dd584c439ca25efaa7e5172da1509628.tar cuberite-80b97fd9dd584c439ca25efaa7e5172da1509628.tar.gz cuberite-80b97fd9dd584c439ca25efaa7e5172da1509628.tar.bz2 cuberite-80b97fd9dd584c439ca25efaa7e5172da1509628.tar.lz cuberite-80b97fd9dd584c439ca25efaa7e5172da1509628.tar.xz cuberite-80b97fd9dd584c439ca25efaa7e5172da1509628.tar.zst cuberite-80b97fd9dd584c439ca25efaa7e5172da1509628.zip |
Diffstat (limited to '')
-rw-r--r-- | src/OSSupport/File.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/OSSupport/File.cpp b/src/OSSupport/File.cpp index 7f0f0ad2f..f1b3bcf9e 100644 --- a/src/OSSupport/File.cpp +++ b/src/OSSupport/File.cpp @@ -67,11 +67,11 @@ bool cFile::Open(const AString & iFileName, eMode iMode) case fmRead: Mode = "rb"; break; case fmWrite: Mode = "wb"; break; case fmReadWrite: Mode = "rb+"; break; - default: - { - ASSERT(!"Unhandled file mode"); - return false; - } + } + if (Mode == NULL) + { + ASSERT(!"Unhandled file mode"); + return false; } #ifdef _WIN32 |