diff --git a/SarInstallerActions/devnode.cpp b/SarInstallerActions/devnode.cpp index 6e8f2d8..59eaf46 100644 --- a/SarInstallerActions/devnode.cpp +++ b/SarInstallerActions/devnode.cpp @@ -156,9 +156,10 @@ UINT __stdcall RemoveDeviceNode(MSIHANDLE hInstall) BOOL found = FALSE; + // A REG_MULTI_SZ: strings separated by one null, ended by two. for (WCHAR *p = buffer; - p < p + requiredSize / sizeof(WCHAR) && *p; - p += lstrlen(p) + 2) { + p < buffer + requiredSize / sizeof(WCHAR) && *p; + p += lstrlen(p) + 1) { if (!lstrcmpi(p, HARDWARE_ID)) { found = TRUE;