| debug_ops[] should stay in sync with the mime_op_t enum. Resolves segfaults |
| seen with USE=debug (--enable-debug-printfs). |
| |
| Reported here: |
| http://www.cups.org/pipermail/cups/2016-March/027577.html |
| |
| --- |
| diff --git a/scheduler/mime.h b/scheduler/mime.h |
| index 3d61d2e1e2a6..814ff64b0eb6 100644 |
| --- a/scheduler/mime.h |
| +++ b/scheduler/mime.h |
| @@ -45,6 +45,7 @@ extern "C" { |
| * Types/structures... |
| */ |
| |
| +/* NOTE: update debug_ops[] in type.c whenever editing this enum */ |
| typedef enum |
| { |
| MIME_MAGIC_NOP, /* No operation */ |
| diff --git a/scheduler/type.c b/scheduler/type.c |
| index 5300d7e7d698..e59104b42d53 100644 |
| --- a/scheduler/type.c |
| +++ b/scheduler/type.c |
| @@ -65,7 +65,8 @@ static const char * const debug_ops[] = |
| "INT", /* Integer/32-bit word matches */ |
| "LOCALE", /* Current locale matches string */ |
| "CONTAINS", /* File contains a string */ |
| - "ISTRING" /* Case-insensitive string matches */ |
| + "ISTRING", /* Case-insensitive string matches */ |
| + "REGEX" /* Regular expression matches */ |
| }; |
| #endif /* DEBUG */ |
| |