regcomp.c: Avoid an empty [] in -Dr output
authorKarl Williamson <khw@cpan.org>
Tue, 1 Mar 2016 22:19:49 +0000 (15:19 -0700)
committerKarl Williamson <khw@cpan.org>
Tue, 1 Mar 2016 22:22:59 +0000 (15:22 -0700)
regcomp.c

index b93b4cd..d66a4c7 100644 (file)
--- a/regcomp.c
+++ b/regcomp.c
@@ -18795,7 +18795,7 @@ Perl_regprop(pTHX_ const regexp *prog, SV *sv, const regnode *o, const regmatch_
         }
 
         /* And, finally, add the above-the-bitmap stuff */
-        if (nonbitmap_invlist) {
+        if (nonbitmap_invlist && _invlist_len(nonbitmap_invlist)) {
             SV* contents;
 
             /* See if truncation size is overridden */