diff --git a/SrcBehaviorLoader/PluginLoader.cpp b/SrcBehaviorLoader/PluginLoader.cpp index 1f0e632023ac12529c223110d7862ae78225f440..b0dd853748d09b4bcedef4f97fe450d12da5b8ce 100644 --- a/SrcBehaviorLoader/PluginLoader.cpp +++ b/SrcBehaviorLoader/PluginLoader.cpp @@ -72,7 +72,7 @@ std::vector<std::string> QueryKey(HKEY hKey, std::string path) CHAR szBuffer[512]; ULONG dwBufferSize = sizeof(szBuffer); - if(auto error_code = regKey.Open(HKEY_LOCAL_MACHINE, path.c_str()); error_code != ERROR_SUCCESS) + if(auto error_code = regKey.Open(HKEY_LOCAL_MACHINE, path.c_str(), KEY_READ); error_code != ERROR_SUCCESS) { qWarning() << "Error opening windows registry path " << path.c_str() << ": " << error_code; regKey.Close();