aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pcre.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pcre.c b/pcre.c
index ab4a30e..3a4366e 100644
--- a/pcre.c
+++ b/pcre.c
@@ -117,7 +117,7 @@ char *match(const char *name, int argc, char **argv)
str = gmk_expand(argv[1]);
ncap = pcre_exec(re, NULL, str, strlen(str), 0, 0, ovec, MAX_CAP*3);
pcre_free(re);
- if (ncap < 0) { /* error occured */
+ if ((ncap < 0) && (ncap != PCRE_ERROR_NOMATCH)) { /* error occured */
fprintf(stderr, "%s: pattern matching error: %d\n", name, ncap);
}