diff options
author | George Hazan <george.hazan@gmail.com> | 2014-11-30 13:03:10 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-11-30 13:03:10 +0000 |
commit | 46789bd14d5fc7448dbd1b68138a8b08964353bc (patch) | |
tree | 27851079c9870206fe7ccb9e2248dff8ff550af2 /plugins/StatusPlugins/KeepStatus | |
parent | 1f91ea192b7cbc5265e9bca4c69fcbc157402cfa (diff) |
safe lstr* replacements: mir_strlen, mir_wstrlen, mir_strcpy, mir_wstrcpy,
mir_strncpy, mir_wstrncpy, mir_strcat, mir_wstrcat, mir_strncat, mir_wstrncat
git-svn-id: http://svn.miranda-ng.org/main/trunk@11171 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/StatusPlugins/KeepStatus')
-rw-r--r-- | plugins/StatusPlugins/KeepStatus/keepstatus.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/plugins/StatusPlugins/KeepStatus/keepstatus.cpp b/plugins/StatusPlugins/KeepStatus/keepstatus.cpp index 6b3876988b..d1b2192697 100644 --- a/plugins/StatusPlugins/KeepStatus/keepstatus.cpp +++ b/plugins/StatusPlugins/KeepStatus/keepstatus.cpp @@ -934,13 +934,12 @@ static int ProcessPopup(int reason, LPARAM lParam) if (!db_get_b(NULL, MODULENAME, SETTING_PUCONNRETRY, TRUE)) return -1; if (lParam) { - int i; PROTOCOLSETTINGEX **ps = (PROTOCOLSETTINGEX **)lParam; TCHAR protoInfoLine[512], protoInfo[MAX_SECONDLINE]; memset(protoInfoLine, '\0', sizeof(protoInfoLine)); memset(protoInfo, '\0', sizeof(protoInfo)); _tcscpy(protoInfo, _T("\r\n")); - for (i = 0; i < connectionSettings.getCount(); i++) { + for (int i = 0; i < connectionSettings.getCount(); i++) { if (_tcslen(ps[i]->tszAccName) > 0 && strlen(ps[i]->szName) > 0) { if ( db_get_b(NULL, MODULENAME, SETTING_PUSHOWEXTRA, TRUE)) { mir_sntprintf(protoInfoLine, SIZEOF(protoInfoLine), TranslateT("%s\t(will be set to %s)\r\n"), ps[i]->tszAccName, pcli->pfnGetStatusModeDescription(ps[i]->status, GSMDF_TCHAR)); @@ -948,11 +947,9 @@ static int ProcessPopup(int reason, LPARAM lParam) } } } - i = _tcslen(protoInfo); - if (i > 0) /* cut the last end of line (this may also be the first one ;)) */ - protoInfo[i - 2] = '\0'; hIcon = LoadSkinnedProtoIcon(ps[0]->szName, SKINICON_STATUS_OFFLINE); + rtrimt(protoInfo); if (retryCount == (maxRetries - 1)) mir_sntprintf(text, SIZEOF(text), TranslateT("Resetting status... (last try (%d))%s"), retryCount + 1, protoInfo); else |