From 1681b4828192e02e34c74a65387562a8b2215faa Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 14 Apr 2015 17:13:05 +0000 Subject: some minor problems in ICQ git-svn-id: http://svn.miranda-ng.org/main/trunk@12821 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/IcqOscarJ/src/UI/userinfotab.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'protocols/IcqOscarJ/src/UI') diff --git a/protocols/IcqOscarJ/src/UI/userinfotab.cpp b/protocols/IcqOscarJ/src/UI/userinfotab.cpp index bc10bc47da..bbd19d4793 100644 --- a/protocols/IcqOscarJ/src/UI/userinfotab.cpp +++ b/protocols/IcqOscarJ/src/UI/userinfotab.cpp @@ -106,19 +106,18 @@ static void SetValue(CIcqProto* ppro, HWND hwndDlg, int idCtrl, MCONTACT hContac unspecified = 1; } else if (special == SVS_STATUSID) { - char *pXName; char *pszStatus = MirandaStatusToStringUtf(dbv.wVal); BYTE bXStatus = ppro->getContactXStatus(hContact); if (bXStatus) { - pXName = ppro->getSettingStringUtf(hContact, DBSETTING_XSTATUS_NAME, NULL); - if (!mir_strlen(pXName)) { // give default name + char *pXName = ppro->getSettingStringUtf(hContact, DBSETTING_XSTATUS_NAME, NULL); + if (pXName == NULL) // give default name pXName = ICQTranslateUtf(nameXStatus[bXStatus - 1]); - } + mir_snprintf(str, SIZEOF(str), "%s (%s)", pszStatus, pXName); SAFE_FREE((void**)&pXName); - } else - strncpy_s(str, pszStatus, _TRUNCATE); + } + else strncpy_s(str, pszStatus, _TRUNCATE); bUtf = 1; SAFE_FREE(&pszStatus); -- cgit v1.2.3