r24757 by jghali - Fix GS detection not working correctly with multiple GS installs

scribus-commit scribus-commit at lists.scribus.net
Mon Oct 25 19:57:08 UTC 2021


Author: jghali
Date: Mon Oct 25 19:57:08 2021
New Revision: 24757

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=24757
Log:
Fix GS detection not working correctly with multiple GS installs

Modified:
    branches/Version14x/Scribus/scribus/util_ghostscript.cpp

Modified: branches/Version14x/Scribus/scribus/util_ghostscript.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24757&path=/branches/Version14x/Scribus/scribus/util_ghostscript.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/util_ghostscript.cpp	(original)
+++ branches/Version14x/Scribus/scribus/util_ghostscript.cpp	Mon Oct 25 19:57:08 2021
@@ -372,7 +372,7 @@
 
 	if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, (LPCWSTR) regKey.utf16(), 0, flags, &hKey1) == ERROR_SUCCESS)
 	{
-		regVersionSize = sizeof(regVersion) / sizeof(WCHAR) - 1;
+		regVersionSize = sizeof(regVersion) / sizeof(WCHAR);
 		DWORD keyIndex = 0;
 		while (RegEnumKeyExW(hKey1, keyIndex, regVersion, &regVersionSize, NULL, NULL, NULL, NULL) == ERROR_SUCCESS)
 		{
@@ -403,6 +403,7 @@
 				}
 				RegCloseKey(hKey2);
 			}
+			regVersionSize = sizeof(regVersion) / sizeof(WCHAR);
 			keyIndex++;
 		}
 		RegCloseKey(hKey1);




More information about the scribus-commit mailing list