diff options
author | George Hazan <george.hazan@gmail.com> | 2012-09-17 13:06:36 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-09-17 13:06:36 +0000 |
commit | dbe6561e59a71811aa3975c792a3af86577c5cfa (patch) | |
tree | d20434e3045f80b6041b4a346e82c10c8df0b67a /plugins/AutoRun/src/main.cpp | |
parent | 23173a574dfe43f1df9764d25592f22f88fec8e6 (diff) |
fix for options' checkbox
git-svn-id: http://svn.miranda-ng.org/main/trunk@1589 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/AutoRun/src/main.cpp')
-rw-r--r-- | plugins/AutoRun/src/main.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/AutoRun/src/main.cpp b/plugins/AutoRun/src/main.cpp index 26af671bcd..86a58639e3 100644 --- a/plugins/AutoRun/src/main.cpp +++ b/plugins/AutoRun/src/main.cpp @@ -42,15 +42,15 @@ static void SetAutorun(BOOL autorun) DWORD dw;
switch (autorun) {
case TRUE:
- if (RegCreateKeyEx(ROOT_KEY, SUB_KEY, 0, NULL, 0, KEY_CREATE_SUB_KEY|KEY_SET_VALUE,NULL,&hKey,&dw) == ERROR_SUCCESS) {
+ if ( RegCreateKeyEx(ROOT_KEY, SUB_KEY, 0, NULL, 0, KEY_CREATE_SUB_KEY|KEY_SET_VALUE,NULL,&hKey,&dw) == ERROR_SUCCESS) {
TCHAR result[MAX_PATH];
GetProfilePath(result);
- RegSetValueEx(hKey, _T("MirandaNG"), 0, REG_SZ, (BYTE*)result, lstrlen(result)+1);
+ RegSetValueEx(hKey, _T("MirandaNG"), 0, REG_SZ, (BYTE*)result, sizeof(TCHAR)*lstrlen(result));
RegCloseKey(hKey);
}
break;
case FALSE:
- if (RegOpenKey(ROOT_KEY, SUB_KEY, &hKey) == ERROR_SUCCESS) {
+ if ( RegOpenKey(ROOT_KEY, SUB_KEY, &hKey) == ERROR_SUCCESS) {
RegDeleteValue(hKey, _T("MirandaNG"));
RegCloseKey(hKey);
}
|