This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
$ perl5.6.2 -MData::Dumper -le' Data::Dumper->Dumpxs([*{*STDERR{IO}}])'
[perl5.git] / dist / Data-Dumper / Dumper.xs
index 52a57f8..7845962 100644 (file)
@@ -909,7 +909,7 @@ DD_dump(pTHX_ SV *val, const char *name, STRLEN namelen, SV *retval, HV *seenhv,
        }
        else if (realtype == SVt_PVGV) {/* GLOBs can end up with scribbly names */
            c = SvPV(val, i);
-           ++c; --i;                   /* just get the name */
+           if(i) ++c, --i;                     /* just get the name */
            if (i >= 6 && strncmp(c, "main::", 6) == 0) {
                c += 4;
                i -= 4;