Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use std strings + use ifstream to parse configuration #9

Merged
merged 10 commits into from
Sep 5, 2021
Prev Previous commit
Fix string contains check being done in the wrong way.
  • Loading branch information
rob5300 committed Sep 5, 2021
commit 150c2d21c2f4688d1039aa25431fc664602c96d5
4 changes: 2 additions & 2 deletions extension.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ vector<string> szStrings;
{
// make sure we're stripping at least 2 or more chars just in case we accidentally inhale a \0
// also there's no reason to strip a single char ever
if (szStrings[i].length() >= 2 && szStrings[i].find(pMessage) != string::npos)
if (szStrings[i].length() >= 2 && strstr(pMessage, szStrings[i].c_str()) != 0)
{
return LR_CONTINUE;
}
Expand All @@ -36,7 +36,7 @@ vector<string> szStrings;
{
// make sure we're stripping at least 2 or more chars just in case we accidentally inhale a \0
// also there's no reason to strip a single char ever
if (szStrings[i].length() >= 2 && szStrings[i].find(text) != string::npos)
if (szStrings[i].length() >= 2 && strstr(text, szStrings[i].c_str()) != 0)
{
return SPEW_CONTINUE;
}
Expand Down