X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=lib%2Fpatmatch.h;h=2aaef12be0fb811b23f310698812a5761438e2d8;hb=86220fcbc5f0c7c17416719103a1eecbfa020db1;hp=6d51216ba8d8dd0820f0809912edf794eb7b4df5;hpb=fab01e0b82bb1678b168fe56940aaa555c3360d5;p=libucw.git diff --git a/lib/patmatch.h b/lib/patmatch.h index 6d51216b..2aaef12b 100644 --- a/lib/patmatch.h +++ b/lib/patmatch.h @@ -20,15 +20,16 @@ MATCH_FUNC_NAME(byte *p, byte *s) if (z == '\\' && p[2]) z = p[2]; z = Convert(z); - while (*s) + for(;;) { while (*s && Convert(*s) != z) s++; - if (*s && match_pattern(p+1, s)) + if (!*s) + return 0; + if (MATCH_FUNC_NAME(p+1, s)) return 1; s++; } - return 0; } else {