summaryrefslogtreecommitdiff
path: root/plugins/Variables/src/parse_regexp.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Variables/src/parse_regexp.cpp')
-rw-r--r--plugins/Variables/src/parse_regexp.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/Variables/src/parse_regexp.cpp b/plugins/Variables/src/parse_regexp.cpp
index f5cb3c6ba8..7031fc4cc6 100644
--- a/plugins/Variables/src/parse_regexp.cpp
+++ b/plugins/Variables/src/parse_regexp.cpp
@@ -39,14 +39,14 @@ static wchar_t *parseRegExpCheck(ARGUMENTSINFO *ai)
return NULL;
pcre16_extra *extra = pcre16_study(ppat, 0, &err);
- int nmat = pcre16_exec(ppat, extra, ai->targv[2], (int)mir_tstrlen(ai->targv[2]), 0, 0, offsets, 99);
+ int nmat = pcre16_exec(ppat, extra, ai->targv[2], (int)mir_wstrlen(ai->targv[2]), 0, 0, offsets, 99);
if (nmat > 0) {
ai->flags &= ~AIF_FALSE;
_ltoa(nmat, szVal, 10);
- return mir_a2t(szVal);
+ return mir_a2u(szVal);
}
- return mir_tstrdup(L"0");
+ return mir_wstrdup(L"0");
}
/*
@@ -72,19 +72,19 @@ static wchar_t *parseRegExpSubstr(ARGUMENTSINFO *ai)
return NULL;
pcre16_extra *extra = pcre16_study(ppat, 0, &err);
- int nmat = pcre16_exec(ppat, extra, ai->targv[2], (int)mir_tstrlen(ai->targv[2]), 0, 0, offsets, 99);
+ int nmat = pcre16_exec(ppat, extra, ai->targv[2], (int)mir_wstrlen(ai->targv[2]), 0, 0, offsets, 99);
if (nmat >= 0)
ai->flags &= ~AIF_FALSE;
if (pcre16_get_substring(ai->targv[2], offsets, nmat, number, &substring) < 0)
ai->flags |= AIF_FALSE;
else {
- wchar_t *tres = mir_tstrdup(substring);
+ wchar_t *tres = mir_wstrdup(substring);
pcre16_free_substring(substring);
return tres;
}
- return mir_tstrdup(L"");
+ return mir_wstrdup(L"");
}
void registerRegExpTokens()