curKey can't be const as it is used as an output argument at RegEnumKeyEx bug 223238.

git-svn-id: svn://10.0.0.236/trunk@154688 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bmlk%gmx.de
2004-04-11 17:48:45 +00:00
parent 772ce164b4
commit f8e075140c

View File

@@ -276,7 +276,7 @@ nsPluginDirServiceProvider::GetFile(const char *prop, PRBool *persistant, nsIFil
DWORD pathlen;
verBlock maxVer;
ClearVersion(&maxVer);
const char curKey[_MAX_PATH] = "Software\\JavaSoft\\Java Plug-in";
char curKey[_MAX_PATH] = "Software\\JavaSoft\\Java Plug-in";
char path[_MAX_PATH];
char newestPath[_MAX_PATH + 4]; // to prevent buffer overrun when adding \bin
const char mozPath[_MAX_PATH] = "Software\\mozilla.org\\Mozilla";
@@ -291,7 +291,7 @@ nsPluginDirServiceProvider::GetFile(const char *prop, PRBool *persistant, nsIFil
path[0] = 0;
numChars = _MAX_PATH;
pathlen = sizeof(path);
result = ::RegEnumKeyEx(baseloc, index, (char *) curKey, &numChars, NULL, NULL, NULL, &modTime);
result = ::RegEnumKeyEx(baseloc, index, curKey, &numChars, NULL, NULL, NULL, &modTime);
index++;
if (ERROR_SUCCESS == result) {
if (ERROR_SUCCESS == ::RegOpenKeyEx(baseloc, curKey, 0, KEY_QUERY_VALUE, &keyloc)) {