summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2014-12-31 23:56:13 +0000
committerKirill Volinsky <mataes2007@gmail.com>2014-12-31 23:56:13 +0000
commitf61f37963eefa84a39cd3ed6cbd84472e7bf481f (patch)
treef13b19688a0d0be882bd47664340d440e6864bc4
parent0d46616e79d43d1356e6050768d977dee1c642a4 (diff)
more correct check
git-svn-id: http://svn.miranda-ng.org/main/trunk@11709 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--plugins/Non-IM Contact/src/namereplacing.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/Non-IM Contact/src/namereplacing.cpp b/plugins/Non-IM Contact/src/namereplacing.cpp
index 690402cd0c..5203b48931 100644
--- a/plugins/Non-IM Contact/src/namereplacing.cpp
+++ b/plugins/Non-IM Contact/src/namereplacing.cpp
@@ -203,10 +203,10 @@ int findChar(char* FileContents[], const char* string, int linesInFile,int start
// do the compare("A","B","X","Y")
void checkStringForcompare(char *str)
{
- char *A,*B, *X, *Y , *newStr = (char*)malloc(strlen(str)), *copyOfStr = _strdup(str);
+ if (!strstr(str, "compare(\"")) return;
+ char *A, *B, *X, *Y, *newStr = (char*)malloc(strlen(str)), *copyOfStr = _strdup(str);
unsigned int i, j = 0, s = (int)strlen(str);
newStr[0] = '\0';
- if (!strstr(str,"compare(\"")) return;
for (i=0; i<s; i++) {
if (!strncmp(&str[i], "compare(\"", strlen("compare(\""))) {
i += (int)strlen("compare(\"");