X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/aa41d2de89da4bf43d52fd12a191742ff9b668a0..47db112512e23853b60b6ecea208056818e10907:/src/src/pcre/pcre_get.c diff --git a/src/src/pcre/pcre_get.c b/src/src/pcre/pcre_get.c index 835ce0d97..451b6d981 100644 --- a/src/src/pcre/pcre_get.c +++ b/src/src/pcre/pcre_get.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/pcre/pcre_get.c,v 1.3 2006/11/07 16:50:36 ph10 Exp $ */ +/* $Cambridge: exim/src/src/pcre/pcre_get.c,v 1.6 2007/11/12 13:02:19 nm4 Exp $ */ /************************************************* * Perl-Compatible Regular Expressions * @@ -8,7 +8,7 @@ and semantics are as close as possible to those of the Perl 5 language. Written by Philip Hazel - Copyright (c) 1997-2006 University of Cambridge + Copyright (c) 1997-2007 University of Cambridge ----------------------------------------------------------------------------- Redistribution and use in source and binary forms, with or without @@ -45,6 +45,10 @@ from the subject string after a regex match has succeeded. The original idea for these functions came from Scott Wimer. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include "pcre_internal.h" @@ -187,7 +191,7 @@ const real_pcre *re = (const real_pcre *)code; int entrysize; char *first, *last; uschar *entry; -if ((re->options & (PCRE_DUPNAMES | PCRE_JCHANGED)) == 0) +if ((re->options & PCRE_DUPNAMES) == 0 && (re->flags & PCRE_JCHANGED) == 0) return pcre_get_stringnumber(code, stringname); entrysize = pcre_get_stringtable_entries(code, stringname, &first, &last); if (entrysize <= 0) return entrysize; @@ -438,7 +442,6 @@ pcre_get_named_substring(const pcre *code, const char *subject, int *ovector, int n = get_first_set(code, stringname, ovector); if (n <= 0) return n; return pcre_get_substring(subject, ovector, stringcount, n, stringptr); - }