diff options
author | Andy Lester <andy@petdance.com> | 2004-03-21 03:27:04 -0600 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2004-03-21 17:22:42 +0000 |
commit | 3b8c0df9bfb9b3699a23e8633f5ede3b929d4620 (patch) | |
tree | 1f0f8b28552fb6a80108cbe8780fdef53a65e611 /pp.c | |
parent | a7ec4e2e48d9a1e5e168070e2793619b1758b3bb (diff) | |
download | perl-3b8c0df9bfb9b3699a23e8633f5ede3b929d4620.tar.gz |
Finally, this "Negative repeat count" warning wasn't such a great
idea. Disable it. But add tests for this :
Subject: Re: [perl #27811] (@x) x -1 is a panic
Message-ID: <20040321152704.GA9041@petdance.com>
p4raw-id: //depot/perl@22549
Diffstat (limited to 'pp.c')
-rw-r--r-- | pp.c | 5 |
1 files changed, 1 insertions, 4 deletions
@@ -1386,11 +1386,8 @@ PP(pp_repeat) dSP; dATARGET; tryAMAGICbin(repeat,opASSIGN); { register IV count = POPi; - if (count < 0) { - if (ckWARN(WARN_MISC)) - Perl_warner(aTHX_ packWARN(WARN_MISC), "Negative repeat count"); + if (count < 0) count = 0; - } if (GIMME == G_ARRAY && PL_op->op_private & OPpREPEAT_DOLIST) { dMARK; I32 items = SP - MARK; |