n o w i t w i l l b e d e t e c t e d :P

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@5143 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Rafael Barreto
2010-06-04 20:49:20 +00:00
parent 2a13607e1e
commit 07c41b2b99
2 changed files with 31 additions and 2 deletions
+2 -2
View File
@@ -168,8 +168,8 @@ inline bool findpattern (char *s, char *d) // returns true if there is more than
if (!d || (len = strlen(d)) < 1) return false;
char *dp = d, *s_end = s + strlen(s);
while (s != s_end) {
if ( *s == ' ' ) {
dp = d; hit = 0; // spaces separate words
if ( *s == ' ' ) { // spaces separate words
if ( !issimilar(*(s+1),*dp) ) { dp = d; hit = 0; } // d e t e c t i t
}
else if ( issimilar(*s,*dp) ) { dp++; hit++; } // hit!
else if ( hit > 0 ) { // this is not a pair, but there is a previous pattern