From 6bd24f7782d09706eaf987b86eaebdcb67f01722 Mon Sep 17 00:00:00 2001
From: gcontini <1121667+gcontini@users.noreply.github.com>
Date: 周三, 19 5月 2021 14:04:53 +0800
Subject: [PATCH] logging

---
 src/library/os/windows/execution_environment.cpp |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/library/os/windows/execution_environment.cpp b/src/library/os/windows/execution_environment.cpp
index 50a255e..7423e9b 100644
--- a/src/library/os/windows/execution_environment.cpp
+++ b/src/library/os/windows/execution_environment.cpp
@@ -30,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) {
@@ -57,6 +56,8 @@
 					// no problem,we're just guessing
 				}
 			}
+			szSingleDrive += strlen(szSingleDrive) + 1;
+			ndrives++;
 		}
 	}
 	return result;

--
Gitblit v1.9.1