summaryrefslogtreecommitdiff
path: root/pcre_fullinfo.c
diff options
context:
space:
mode:
Diffstat (limited to 'pcre_fullinfo.c')
-rw-r--r--pcre_fullinfo.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/pcre_fullinfo.c b/pcre_fullinfo.c
index f0f6b21..b10189c 100644
--- a/pcre_fullinfo.c
+++ b/pcre_fullinfo.c
@@ -91,6 +91,9 @@ means that the pattern is likely compiled with different endianness. */
if (re->magic_number != MAGIC_NUMBER)
return re->magic_number == REVERSED_MAGIC_NUMBER?
PCRE_ERROR_BADENDIANNESS:PCRE_ERROR_BADMAGIC;
+
+/* Check that this pattern was compiled in the correct bit mode */
+
if ((re->flags & PCRE_MODE) == 0) return PCRE_ERROR_BADMODE;
switch (what)
@@ -117,7 +120,6 @@ switch (what)
#else
*((size_t *)where) = 0;
#endif
-
break;
case PCRE_INFO_CAPTURECOUNT: