From 2d75b7944990f1ce80b3847be1f8dff09df82dad Mon Sep 17 00:00:00 2001 From: Victor Toofic <toofics@users.noreply.github.com> Date: ćšć, 20 5æ 2021 00:04:08 +0800 Subject: [PATCH] - use CMake PROJECT_DESCRIPTION var instead to be able to build with cmake < 3.8 (#118) --- src/library/os/windows/execution_environment.cpp | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/library/os/windows/execution_environment.cpp b/src/library/os/windows/execution_environment.cpp index d080931..7423e9b 100644 --- a/src/library/os/windows/execution_environment.cpp +++ b/src/library/os/windows/execution_environment.cpp @@ -20,8 +20,7 @@ namespace os { using namespace std; -ExecutionEnvironment::ExecutionEnvironment() : - m_container_type(CONTAINER_TYPE::NONE) {} +ExecutionEnvironment::ExecutionEnvironment() : m_container_type(CONTAINER_TYPE::NONE) {} #define MAX_UNITS 20 CONTAINER_TYPE wine_container() { @@ -31,8 +30,7 @@ CONTAINER_TYPE result = CONTAINER_TYPE::NONE; const DWORD dwResult = GetLogicalDriveStrings(dwSize, szLogicalDrives); - - //FIXME! this code missed the increment in the loop... + if (dwResult > 0 && dwResult <= MAX_PATH) { char* szSingleDrive = szLogicalDrives; while (*szSingleDrive && ndrives < MAX_UNITS) { @@ -58,6 +56,8 @@ // no problem,we're just guessing } } + szSingleDrive += strlen(szSingleDrive) + 1; + ndrives++; } } return result; -- Gitblit v1.9.1