From 3abfa2c24677666cfd7ad5120e254e6e459dc202 Mon Sep 17 00:00:00 2001
From: gcontini <1121667+gcontini@users.noreply.github.com>
Date: 周六, 05 12月 2020 23:37:58 +0800
Subject: [PATCH] fix missing increment in wine

---
 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