This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
regcomp.c: Fix wrong type for format
authorKarl Williamson <khw@cpan.org>
Thu, 27 Feb 2020 15:58:11 +0000 (08:58 -0700)
committerKarl Williamson <khw@cpan.org>
Sun, 1 Mar 2020 16:02:08 +0000 (09:02 -0700)
The previous commit showed this bug exists where a format wasn't matched
by the type of its argument

regcomp.c

index dbe4f19..b51f82f 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -11478,7 +11478,7 @@ S_reg(pTHX_ RExC_state_t *pRExC_state, I32 paren, I32 *flagp, U32 depth)
                         || *RExC_parse != paren)
                     {
                        vFAIL2("Sequence (?%c... not terminated",
-                           paren=='>' ? '<' : paren);
+                           paren=='>' ? '<' : (char) paren);
                     }
                    {
                        HE *he_str;