Replace magic number with system define

This commit is contained in:
dzmat
2018-09-21 16:26:17 +07:00
committed by sledgehammer999
parent fb885d89c1
commit 9f1eb3600a

View File

@@ -581,7 +581,7 @@ QString Utils::Misc::libtorrentVersionString()
QString Utils::Misc::windowsSystemPath() QString Utils::Misc::windowsSystemPath()
{ {
static const QString path = []() -> QString { static const QString path = []() -> QString {
WCHAR systemPath[64] = {0}; WCHAR systemPath[MAX_PATH] = {0};
GetSystemDirectoryW(systemPath, sizeof(systemPath) / sizeof(WCHAR)); GetSystemDirectoryW(systemPath, sizeof(systemPath) / sizeof(WCHAR));
return QString::fromWCharArray(systemPath); return QString::fromWCharArray(systemPath);
}(); }();