This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
pad.c: cast before comparing signed with unsigned
authorFather Chrysostomos <sprout@cpan.org>
Thu, 20 Jun 2013 12:25:01 +0000 (05:25 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Fri, 26 Jul 2013 06:47:59 +0000 (23:47 -0700)
pad.c

diff --git a/pad.c b/pad.c
index 8e7c47c..8407ba6 100644 (file)
--- a/pad.c
+++ b/pad.c
@@ -1653,7 +1653,7 @@ Perl_pad_swipe(pTHX_ PADOFFSET po, bool refadjust)
     PL_curpad[po] = &PL_sv_undef;
 #endif
     if (PadnamelistMAX(PL_comppad_name) != -1
-     && PadnamelistMAX(PL_comppad_name) >= po) {
+     && (PADOFFSET)PadnamelistMAX(PL_comppad_name) >= po) {
        assert(!PadnameLEN(PadnamelistARRAY(PL_comppad_name)[po]));
        PadnamelistARRAY(PL_comppad_name)[po] = &PL_sv_undef;
     }