From 49d70454db15c99d8ed27d1ab9c6a159aff0f0bb Mon Sep 17 00:00:00 2001 From: Charles Magahern Date: Tue, 17 Mar 2020 23:04:09 -0700 Subject: [PATCH] Fix bug where the launcher doesn't start on Windows XP --- src/util.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/util.cpp b/src/util.cpp index a254ded..783bfbe 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -14,16 +14,12 @@ FilePath::FilePath(const std::wstring &path) filename(MAX_PATH, L'\0'), extension(MAX_PATH, L'\0') { - _wsplitpath_s( + _wsplitpath( path.c_str(), drive.data(), - drive.length() * sizeof(wchar_t), directory.data(), - directory.length() * sizeof(wchar_t), filename.data(), - filename.length() * sizeof(wchar_t), - extension.data(), - extension.length() * sizeof(wchar_t) + extension.data() ); drive.resize(wcslen(drive.c_str())); @@ -35,9 +31,8 @@ FilePath::FilePath(const std::wstring &path) std::wstring FilePath::path() const { std::wstring path(MAX_PATH, L'\0'); - _wmakepath_s( + _wmakepath( path.data(), - path.length() * sizeof(wchar_t), drive.c_str(), directory.c_str(), filename.c_str(), -- 2.45.2