This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
PERL_FILTER_EXISTS: Convert to use av_count()
authorKarl Williamson <khw@cpan.org>
Thu, 20 Aug 2020 00:17:36 +0000 (18:17 -0600)
committerKarl Williamson <khw@cpan.org>
Thu, 20 Aug 2020 00:29:55 +0000 (18:29 -0600)
perl.h

diff --git a/perl.h b/perl.h
index 104b411..c88e44e 100644 (file)
--- a/perl.h
+++ b/perl.h
@@ -3772,7 +3772,7 @@ typedef I32 (*filter_t) (pTHX_ int, SV *, int);
                && idx >= AvFILLp(PL_parser->rsfp_filters))
 #define PERL_FILTER_EXISTS(i) \
            (PL_parser && PL_parser->rsfp_filters \
-               && (i) <= av_tindex(PL_parser->rsfp_filters))
+               && (i) < av_count(PL_parser->rsfp_filters))
 
 #if defined(_AIX) && !defined(_AIX43)
 #if defined(USE_REENTRANT) || defined(_REENTRANT) || defined(_THREAD_SAFE)