summaryrefslogtreecommitdiff
path: root/plugins/UserInfoEx/src/ctrl_contact.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-01-01 20:35:38 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-01-01 20:35:38 +0000
commite4d203d2f4c2fd58e83460421ba704b04f2bcdce (patch)
treeb8dc653cc6358d9d40e15072d59e6fccffbd45fa /plugins/UserInfoEx/src/ctrl_contact.cpp
parent8ac50e588c3497c7616647d6b167be814677330e (diff)
\0 removed
git-svn-id: http://svn.miranda-ng.org/main/trunk@11718 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/UserInfoEx/src/ctrl_contact.cpp')
-rw-r--r--plugins/UserInfoEx/src/ctrl_contact.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/plugins/UserInfoEx/src/ctrl_contact.cpp b/plugins/UserInfoEx/src/ctrl_contact.cpp
index 14825a6820..2bdedb3ae5 100644
--- a/plugins/UserInfoEx/src/ctrl_contact.cpp
+++ b/plugins/UserInfoEx/src/ctrl_contact.cpp
@@ -983,7 +983,7 @@ static LRESULT CALLBACK CtrlContactWndProc(HWND hwnd, UINT msg, WPARAM wParam, L
if (pItem->wMask & CBEXIM_CAT) {
// set category string
if (!pItem->pszCat || !pItem->pszCat[0] || !mir_tstrncpy(cbex->pItems[pItem->iItem].szCat, pItem->pszCat, SIZEOF(cbex->pItems[pItem->iItem].szCat)))
- mir_sntprintf(cbex->pItems[pItem->iItem].szCat, SIZEOF(cbex->pItems[pItem->iItem].szCat), _T("%s %d\0"), TranslateT("Other"), ++cbex->numOther);
+ mir_sntprintf(cbex->pItems[pItem->iItem].szCat, SIZEOF(cbex->pItems[pItem->iItem].szCat), _T("%s %d"), TranslateT("Other"), ++cbex->numOther);
if (pItem->iItem == cbex->iSelectedItem)
SetWindowText(cbex->hBtnEdit, cbex->pItems[pItem->iItem].szCat);
}
@@ -1284,20 +1284,17 @@ int CtrlContactAddItemFromDB(
{
DBVARIANT dbv;
CBEXITEM cbi;
- LPTSTR sms;
cbi.pszVal = NULL;
cbi.dwID = hashSetting(szSettingVal);
cbi.wFlags = CBEXIF_CATREADONLY|DB::Setting::GetTStringCtrl(hContact, pszModule, pszModule, pszProto, szSettingVal, &dbv);
if (dbv.type >= DBVT_WCHAR) {
// no value read from database
- if (cbi.wFlags == CBEXIF_CATREADONLY) {
+ if (cbi.wFlags == CBEXIF_CATREADONLY)
cbi.pszVal = NULL;
- }
- // check the database value
- else {
+ else { // check the database value
cbi.pszVal = dbv.ptszVal;
- if (sms = _tcsstr(cbi.pszVal, _T(" SMS\0"))) {
+ if (LPTSTR sms = _tcsstr(cbi.pszVal, _T(" SMS"))) {
cbi.wFlags |= CBEXIF_SMS;
*sms = 0;
}