From 9491633b5f6c8b2f770cb7666ab8029e17410e9d Mon Sep 17 00:00:00 2001 From: Sergey Lipskiy Date: Tue, 22 Nov 2016 09:40:05 +0700 Subject: [PATCH] Fix comlilation on Linux. --- src/Log.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Log.cpp b/src/Log.cpp index dc86ed7f..45b58456 100644 --- a/src/Log.cpp +++ b/src/Log.cpp @@ -17,8 +17,9 @@ void LOG(u16 type, const char * format, ...) { #ifdef OS_WINDOWS FILE *dumpFile = _wfopen(logPath, wst("a+")); #else - char cbuf[MAX_PATH]; - wcstombs(cbuf, logPath, MAX_PATH); + constexpr size_t bufSize = PLUGIN_PATH_SIZE * 6; + char cbuf[bufSize]; + wcstombs(cbuf, logPath, bufSize); FILE *dumpFile = fopen(cbuf, "a+"); #endif