This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
regcomp.c: Add cast.
authorKarl Williamson <public@khwilliamson.com>
Thu, 10 Feb 2011 01:27:39 +0000 (18:27 -0700)
committerKarl Williamson <public@khwilliamson.com>
Mon, 14 Feb 2011 15:41:38 +0000 (08:41 -0700)
I found this through gdb.  Sign extension was happening.

regcomp.c

index 51fe1cd..f6310c7 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -8613,7 +8613,7 @@ tryagain:
                        p += numlen;
                    }
                    else
-                       ender = *p++;
+                       ender = (U8) *p++;
                    break;
                } /* End of switch on the literal */