summaryrefslogtreecommitdiffstats
path: root/MultiMC.cpp
diff options
context:
space:
mode:
authorrobotbrain <robotbrainify@gmail.com>2014-03-05 16:35:35 -0500
committerrobotbrain <robotbrainify@gmail.com>2014-03-05 16:35:35 -0500
commit6e964acde507640a3ce218cdd2393b1b49acd925 (patch)
tree346cf7689cb47a53346c41a187cf48dbb8e93934 /MultiMC.cpp
parentbb6894893d3da021ea0f2e30615fe9ed72502e5b (diff)
downloadMultiMC-6e964acde507640a3ce218cdd2393b1b49acd925.tar
MultiMC-6e964acde507640a3ce218cdd2393b1b49acd925.tar.gz
MultiMC-6e964acde507640a3ce218cdd2393b1b49acd925.tar.lz
MultiMC-6e964acde507640a3ce218cdd2393b1b49acd925.tar.xz
MultiMC-6e964acde507640a3ce218cdd2393b1b49acd925.zip
Use a constant for the buffer size.
Diffstat (limited to 'MultiMC.cpp')
-rw-r--r--MultiMC.cpp7
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????";
}