Fix an error in backtracking (apparently exacerbated by escapes).
authorMichael Poole <mdpoole@troilus.org>
Fri, 27 Jul 2007 01:35:57 +0000 (21:35 -0400)
committerMichael Poole <mdpoole@troilus.org>
Fri, 27 Jul 2007 01:35:57 +0000 (21:35 -0400)
src/tools.c: When backtracking, make sure we have not hit the end of text.

src/tools.c

index d8080f4926f84fbe1a6732a6f58dcee02cf28f49..691471cbc4b84ec50e7936d5c58bdc91c35f5acc 100644 (file)
@@ -533,6 +533,8 @@ match_ircglob(const char *text, const char *glob)
             return 0;
         m = m_tmp;
         n = ++n_tmp;
+        if (!*n)
+            return 0;
         break;
     case '\\':
         m++;