summaryrefslogtreecommitdiff
path: root/plugins/Clist_nicer/src
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Clist_nicer/src')
-rw-r--r--plugins/Clist_nicer/src/Include/commonheaders.h1
-rw-r--r--plugins/Clist_nicer/src/extBackg.cpp9
-rw-r--r--plugins/Clist_nicer/src/viewmodes.cpp20
3 files changed, 15 insertions, 15 deletions
diff --git a/plugins/Clist_nicer/src/Include/commonheaders.h b/plugins/Clist_nicer/src/Include/commonheaders.h
index a3b7759d7a..a78cab075e 100644
--- a/plugins/Clist_nicer/src/Include/commonheaders.h
+++ b/plugins/Clist_nicer/src/Include/commonheaders.h
@@ -57,6 +57,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <m_fontservice.h>
#include <m_xstatus.h>
#include <m_extraicons.h>
+#include <m_string.h>
#include <m_metacontacts.h>
#include <m_cln_skinedit.h>
diff --git a/plugins/Clist_nicer/src/extBackg.cpp b/plugins/Clist_nicer/src/extBackg.cpp
index bf285973c1..4e441c8c98 100644
--- a/plugins/Clist_nicer/src/extBackg.cpp
+++ b/plugins/Clist_nicer/src/extBackg.cpp
@@ -288,11 +288,10 @@ void LoadExtBkSettingsFromDB()
ID_EXTBK_LAST++;
mir_snprintf(p->szDBname, SIZEOF(p->szDBname), "EXBK_%s", accs[i]->szModuleName);
- if (i == 0) {
- mir_strncpy(p->szName, "{-}", SIZEOF(p->szName));
- mir_strncat(p->szName, accs[i]->szModuleName, SIZEOF(p->szName) - mir_strlen(p->szName));
- }
- else mir_strncpy(p->szName, accs[i]->szModuleName, SIZEOF(p->szName));
+ if (i == 0)
+ mir_snprintf(p->szName, SIZEOF(p->szName), "{-}%s", accs[i]->szModuleName);
+ else
+ strncpy_s(p->szName, accs[i]->szModuleName, _TRUNCATE);
p->statusID = ID_EXTBK_LAST;
arStatusItems.insert(p);
}
diff --git a/plugins/Clist_nicer/src/viewmodes.cpp b/plugins/Clist_nicer/src/viewmodes.cpp
index d18dddb6d1..b2d6d8e753 100644
--- a/plugins/Clist_nicer/src/viewmodes.cpp
+++ b/plugins/Clist_nicer/src/viewmodes.cpp
@@ -321,9 +321,9 @@ void SaveViewMode(const char *name, const TCHAR *szGroupFilter, const char *szPr
// saves the state of the filter definitions for the current item
void SaveState()
{
- TCHAR newGroupFilter[2048] = _T("|");
- char newProtoFilter[2048] = "|";
- int i, iLen;
+ CMString newGroupFilter(_T("|"));
+ CMStringA newProtoFilter("|");
+ int i;
HWND hwndList;
char *szModeName = NULL;
DWORD statusMask = 0;
@@ -345,9 +345,9 @@ void SaveState()
item.cchTextMax = SIZEOF(szTemp);
item.iItem = i;
SendMessageA(hwndList, LVM_GETITEMA, 0, (LPARAM)&item);
- mir_strncat(newProtoFilter, szTemp, SIZEOF(newProtoFilter) - mir_strlen(newProtoFilter));
- mir_strncat(newProtoFilter, "|", SIZEOF(newProtoFilter) - mir_strlen(newProtoFilter));
- newProtoFilter[2047] = 0;
+
+ newProtoFilter.Append(szTemp);
+ newProtoFilter.AppendChar('|');
}
}
}
@@ -367,9 +367,9 @@ void SaveState()
item.cchTextMax = SIZEOF(szTemp);
item.iItem = i;
SendMessage(hwndList, LVM_GETITEM, 0, (LPARAM)&item);
- mir_tstrncat(newGroupFilter, szTemp, SIZEOF(newGroupFilter) - mir_tstrlen(newGroupFilter));
- mir_tstrncat(newGroupFilter, _T("|"), SIZEOF(newGroupFilter) - mir_tstrlen(newGroupFilter));
- newGroupFilter[2047] = 0;
+
+ newGroupFilter.Append(szTemp);
+ newGroupFilter.AppendChar('|');
}
}
}
@@ -378,7 +378,7 @@ void SaveState()
if (ListView_GetCheckState(hwndList, i - ID_STATUS_OFFLINE))
statusMask |= (1 << (i - ID_STATUS_OFFLINE));
- iLen = SendDlgItemMessageA(clvmHwnd, IDC_VIEWMODES, LB_GETTEXTLEN, clvm_curItem, 0);
+ int iLen = SendDlgItemMessageA(clvmHwnd, IDC_VIEWMODES, LB_GETTEXTLEN, clvm_curItem, 0);
if (iLen) {
unsigned int stickies = 0;
DWORD dwGlobalMask, dwLocalMask;