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
[perl5.git] / 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;
     }