diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2014-12-31 10:55:52 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2014-12-31 10:55:52 +0000 |
commit | 6cc54049b4e7ba48787758c5332341df6f93be81 (patch) | |
tree | e4712db18280f6099d804abff84739cb7b8c3f7a /plugins/DbEditorPP/src/findwindow.cpp | |
parent | cad77e7d51aef2c4d938fca592921e14d923f8c5 (diff) |
minor fixes
git-svn-id: http://svn.miranda-ng.org/main/trunk@11692 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/DbEditorPP/src/findwindow.cpp')
-rw-r--r-- | plugins/DbEditorPP/src/findwindow.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/plugins/DbEditorPP/src/findwindow.cpp b/plugins/DbEditorPP/src/findwindow.cpp index 7071322571..d49c185cc8 100644 --- a/plugins/DbEditorPP/src/findwindow.cpp +++ b/plugins/DbEditorPP/src/findwindow.cpp @@ -204,7 +204,7 @@ void ItemFound(HWND hwnd, MCONTACT hContact, const char *module, const char *set mir_snprintf(text, SIZEOF(text), Translate("%s Module \"%s\" in contact \"%s\""), mode, module, name);
break;
case FW_SETTINGNAME:
- mir_strncpy(ii->setting, setting, 256);
+ mir_strncpy(ii->setting, setting, SIZEOF(ii->setting));
ii->type = FW_SETTINGNAME;
if (GetValue(hContact, module, setting, szValue, SIZEOF(szValue)))
mir_snprintf(text, SIZEOF(text), Translate("%s Setting \"%s\" in module \"%s\" in contact \"%s\" - \"%s\""), mode, setting, module, name, szValue);
@@ -212,7 +212,7 @@ void ItemFound(HWND hwnd, MCONTACT hContact, const char *module, const char *set mir_snprintf(text, SIZEOF(text), Translate("%s Setting \"%s\" in module \"%s\" in contact \"%s\""), mode, setting, module, name);
break;
case FW_SETTINGVALUE:
- mir_strncpy(ii->setting, setting, 256);
+ mir_strncpy(ii->setting, setting, SIZEOF(ii->setting));
ii->type = FW_SETTINGVALUE;
mir_snprintf(text, SIZEOF(text), Translate("%s \"%s\" in Setting \"%s\" in module \"%s\" in contact \"%s\""), mode, value, setting, module, name);
break;
@@ -225,7 +225,7 @@ void ItemFound(HWND hwnd, MCONTACT hContact, const char *module, const char *set }
else {
ii->hContact = hContact;
- mir_strncpy(ii->module, module, 256);
+ mir_strncpy(ii->module, module, SIZEOF(ii->module));
SendMessage(hwnd, LB_SETITEMDATA, index, (LPARAM)ii);
}
}
@@ -364,6 +364,8 @@ int replaceSetting(HWND hwnd, MCONTACT hContact, const char *module, const char }
else db_free(&dbv2);
+ mir_free(myreplace);
+
return count;
}
|