summaryrefslogtreecommitdiff
path: root/plugins/HistoryLinkListPlus/src
diff options
context:
space:
mode:
authorTobias Weimer <wishmaster51@googlemail.com>2015-07-14 21:31:39 +0000
committerTobias Weimer <wishmaster51@googlemail.com>2015-07-14 21:31:39 +0000
commitd65e5e4cf5e91e311d95325fa04d6883bf2a2d96 (patch)
tree4335a9885a5da5d4b674290a4df81d387e062b91 /plugins/HistoryLinkListPlus/src
parentf68793bdec7018352995a4e15d7e64807362f6b6 (diff)
HistoryLinklist:
-Fixed https://www... links git-svn-id: http://svn.miranda-ng.org/main/trunk@14560 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/HistoryLinkListPlus/src')
-rw-r--r--plugins/HistoryLinkListPlus/src/linklist_fct.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/plugins/HistoryLinkListPlus/src/linklist_fct.cpp b/plugins/HistoryLinkListPlus/src/linklist_fct.cpp
index d7fefdaacb..926bbc02ae 100644
--- a/plugins/HistoryLinkListPlus/src/linklist_fct.cpp
+++ b/plugins/HistoryLinkListPlus/src/linklist_fct.cpp
@@ -137,16 +137,12 @@ int ExtractURI(DBEVENTINFO *dbei, MEVENT hEvent, LISTELEMENT *listStart)
type = LINK_URL;
}
- if (isLink && wordlen <= (LINK_MAX - _mstrlen(_T("http://")))) {
- if (_tcsstr(wordsearch, _T("www.")) != NULL && _tcsstr(wordsearch, _T("http://")) == NULL) {
- _tcsncpy_s(link, _T("http://"), _mstrlen(_T("http://")));
- // Link longer than defined max -> cut link to max
- if (wordlen > (LINK_MAX - _mstrlen(_T("http://"))))
- _tcsncpy_s((link + _mstrlen(_T("http://"))), (_countof(link) - _mstrlen(_T("http://"))), word, LINK_MAX - _mstrlen(_T("http://")));
- else
- _tcsncpy_s((link + _mstrlen(_T("http://"))), (_countof(link) - _mstrlen(_T("http://"))), word, wordlen);
+ if (isLink && wordlen <= LINK_MAX) {
+ if (_tcsstr(wordsearch, _T("www.")) != NULL && _tcsstr(wordsearch, _T("http://")) == NULL && _tcsstr(wordsearch, _T("https://")) == NULL) {
+ _tcsncpy_s(link, _T("http://"), LINK_MAX);
+ _tcsncat_s(link, word, LINK_MAX);
} else {
- _tcsncpy_s(link, word, ((wordlen > LINK_MAX) ? LINK_MAX : wordlen));
+ _tcsncpy_s(link, word, LINK_MAX);
}
TimeZone_ToStringT(dbei->timestamp, _T("d-t"), dbdate, _countof(dbdate));