summaryrefslogtreecommitdiff
path: root/stopspam.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'stopspam.cpp')
-rwxr-xr-xstopspam.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/stopspam.cpp b/stopspam.cpp
index f99e4c9..d39e84e 100755
--- a/stopspam.cpp
+++ b/stopspam.cpp
@@ -235,7 +235,7 @@ MIRANDA_HOOK_EVENT(ME_DB_EVENT_FILTER_ADD, w, l)
std::list<int> args;
std::list<TCHAR> actions;
tstring::size_type p1 = gbQuestion.find(_T("X")), p2 = 0;
- const tstring expr_chars = _T("X+-/*");
+ const tstring expr_chars = _T("X+-/*"), expr_acts = _T("+-/*");
while(p1 < gbQuestion.length() && p1 != tstring::npos && expr_chars.find(gbQuestion[p1]) != tstring::npos)
{
std::string arg;
@@ -252,7 +252,7 @@ MIRANDA_HOOK_EVENT(ME_DB_EVENT_FILTER_ADD, w, l)
tmp_question.replace(p2, arg.size(), arg);
#endif
args.push_back(atoi(arg.c_str()));
- if((p1 < gbQuestion.length()) && (p1 != tstring::npos))
+ if((p1 < gbQuestion.length()) && (p1 != tstring::npos) && (expr_acts.find(gbQuestion[p1]) != tstring::npos))
actions.push_back(gbQuestion[p1]);
++p1;
}