From a0fa0cded46bdc94293f02d4070a69bcae5478bb Mon Sep 17 00:00:00 2001 From: Vitaly Novichkov Date: Wed, 20 Jun 2018 19:17:01 +0300 Subject: Avoid possible failure to compile for Windows --- src/file_reader.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/file_reader.hpp b/src/file_reader.hpp index ce4307b..e0664b4 100644 --- a/src/file_reader.hpp +++ b/src/file_reader.hpp @@ -83,14 +83,14 @@ public: */ void openFile(const char *path) { - #if !defined(_WIN32) || defined(__WATCOMC__) +#if !defined(_WIN32) || defined(__WATCOMC__) m_fp = std::fopen(path, "rb"); - #else +#else wchar_t widePath[MAX_PATH]; int size = MultiByteToWideChar(CP_UTF8, 0, path, (int)std::strlen(path), widePath, MAX_PATH); widePath[size] = '\0'; - fp = _wfopen(widePath, L"rb"); - #endif + m_fp = _wfopen(widePath, L"rb"); +#endif m_file_name = path; m_mp = NULL; m_mp_size = 0; -- cgit v1.2.3