summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Pösel <robyer@seznam.cz>2012-05-18 13:28:06 +0000
committerRobert Pösel <robyer@seznam.cz>2012-05-18 13:28:06 +0000
commit195abf5e457c3063d5a913caafed5ccb6c24d4e8 (patch)
treede083a1f5239e7e9f1caac4ba83c613716e32b09
parent11db91e81fa495935c75ee3812ec3806e15ca510 (diff)
Fix for "Append nick" in clist_modern (Miranda issue #755)
git-svn-id: http://svn.miranda-ng.org/main/trunk@42 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--plugins/modernb/modern_cachefuncs.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/plugins/modernb/modern_cachefuncs.cpp b/plugins/modernb/modern_cachefuncs.cpp
index eee59c82f0..46e0d40b03 100644
--- a/plugins/modernb/modern_cachefuncs.cpp
+++ b/plugins/modernb/modern_cachefuncs.cpp
@@ -594,12 +594,9 @@ void Cache_GetFirstLineText(struct ClcData *dat, struct ClcContact *contact)
lstrcpyn(nick, dbv.ptszVal, SIZEOF(contact->szText));
ModernDBFreeVariant(&dbv);
- if (_tcsnicmp(name, nick, lstrlen(name)) == 0) {
- // They are the same -> use the nick to keep the case
- lstrcpyn(contact->szText, nick, SIZEOF(contact->szText));
- } else if (_tcsnicmp(name, nick, lstrlen(nick)) == 0) {
- // They are the same -> use the nick to keep the case
- lstrcpyn(contact->szText, name, SIZEOF(contact->szText));
+ if (_tcsicmp(name, nick) == 0) {
+ // They are the same -> use the name to keep the case
+ lstrcpyn(contact->szText, name, SIZEOF(contact->szText));
} else {
// Append then
mir_sntprintf(contact->szText, SIZEOF(contact->szText), _T("%s - %s"), name, nick);