gcontini
2020-12-05 3abfa2c24677666cfd7ad5120e254e6e459dc202
fix missing increment in wine
1个文件已修改
8 ■■■■ 已修改文件
src/library/os/windows/execution_environment.cpp 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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;