diff options
-rw-r--r-- | MultiMC.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/MultiMC.cpp b/MultiMC.cpp index ff4b186a..6c5c4db6 100644 --- a/MultiMC.cpp +++ b/MultiMC.cpp @@ -38,7 +38,8 @@ #include <logger/QsLogDest.h> #ifdef Q_OS_WIN32 -#include "windows.h" +#include <windows.h> +static const int APPDATA_BUFFER_SIZE = 1024; #endif using namespace Util::Commandline; @@ -322,9 +323,9 @@ void MultiMC::initGlobalSettings() #ifdef Q_OS_LINUX QString ftbDefault = QDir::home().absoluteFilePath(".ftblauncher"); #elif defined(Q_OS_WIN32) - wchar_t buf[1000]; + wchar_t buf[APPDATA_BUFFER_SIZE]; QString ftbDefault; - if(!GetEnvironmentVariableW(L"APPDATA", buf, 1000)) + if(!GetEnvironmentVariableW(L"APPDATA", buf, APPDATA_BUFFER_SIZE)) { QLOG_FATAL() << "Your APPDATA folder is missing! If you are on windows, this means your system is broken. If you aren't on windows, how the **** are you running the windows build????"; } |