diff options
Diffstat (limited to 'plugins/IEView/src')
-rw-r--r-- | plugins/IEView/src/TextToken.cpp | 10 | ||||
-rw-r--r-- | plugins/IEView/src/Utils.cpp | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/plugins/IEView/src/TextToken.cpp b/plugins/IEView/src/TextToken.cpp index e44dc5e35b..ad08ee7856 100644 --- a/plugins/IEView/src/TextToken.cpp +++ b/plugins/IEView/src/TextToken.cpp @@ -78,7 +78,7 @@ static int countNoWhitespace(const wchar_t *str) TextToken* TextToken::tokenizeBBCodes(const wchar_t *text)
{
- return tokenizeBBCodes(text, (int)wcslen(text));
+ return tokenizeBBCodes(text, (int)mir_wstrlen(text));
}
// TODO: Add the following BBCodes: code
@@ -239,7 +239,7 @@ TextToken* TextToken::tokenizeLinks(const wchar_t *text) {
TextToken *firstToken = NULL, *lastToken = NULL;
int textLen = 0;
- int l = (int)wcslen(text);
+ int l = (int)mir_wstrlen(text);
for (int i = 0; i <= l;) {
int newTokenType, newTokenSize;
int urlLen = Utils::detectURL(text + i);
@@ -295,7 +295,7 @@ TextToken* TextToken::tokenizeLinks(const wchar_t *text) TextToken* TextToken::tokenizeSmileys(MCONTACT hContact, const char *proto, const wchar_t *text, bool isSent)
{
TextToken *firstToken = NULL, *lastToken = NULL;
- int l = (int)wcslen(text);
+ int l = (int)mir_wstrlen(text);
if (!Options::isSmileyAdd())
return new TextToken(TEXT, text, l);
@@ -352,7 +352,7 @@ TextToken* TextToken::tokenizeChatFormatting(const wchar_t *text) {
TextToken *firstToken = NULL, *lastToken = NULL;
int textLen = 0;
- int l = (int)wcslen(text);
+ int l = (int)mir_wstrlen(text);
wchar_t* tokenBuffer = new wchar_t[l + 1];
for (int i = 0; i <= l;) {
int newTokenType = TEXT;
@@ -521,7 +521,7 @@ void TextToken::toString(CMStringW &str) if (match != NULL) {
match += 2;
wchar_t *match2 = wcsstr(match, L"&");
- int len = match2 != NULL ? match2 - match : (int)wcslen(match);
+ int len = match2 != NULL ? match2 - match : (int)mir_wstrlen(match);
match = mir_wstrdup(match);
match[len] = 0;
int width = 0;
diff --git a/plugins/IEView/src/Utils.cpp b/plugins/IEView/src/Utils.cpp index 77def5af4b..1655b06c95 100644 --- a/plugins/IEView/src/Utils.cpp +++ b/plugins/IEView/src/Utils.cpp @@ -32,8 +32,8 @@ const wchar_t *Utils::getBaseDir() wchar_t* Utils::toAbsolute(wchar_t* relative)
{
const wchar_t* bdir = getBaseDir();
- long len = (int)wcslen(bdir);
- long tlen = len + (int)wcslen(relative);
+ long len = (int)mir_wstrlen(bdir);
+ long tlen = len + (int)mir_wstrlen(relative);
wchar_t* result = (wchar_t*)mir_alloc(sizeof(wchar_t)*(tlen + 1));
if (result) {
wcscpy(result, bdir);
|