This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
regcomp.c: Add assertion
authorKarl Williamson <khw@cpan.org>
Wed, 13 Mar 2019 20:23:03 +0000 (14:23 -0600)
committerKarl Williamson <khw@cpan.org>
Wed, 13 Mar 2019 21:42:49 +0000 (15:42 -0600)
regcomp.c

index f0adce9..3b26946 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -16794,6 +16794,7 @@ S_regclass(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth,
                               "Ignoring zero length \\N{} in character class");
                         }
                         else { /* cp_count > 1 */
+                            assert(cp_count > 1);
                             if (! RExC_in_multi_char_class) {
                                 if (invert || range || *RExC_parse == '-') {
                                     if (strict) {