summaryrefslogtreecommitdiff
path: root/pp.c
diff options
context:
space:
mode:
authorChip Salzenberg <chip@perl.com>1997-02-06 08:59:11 +1200
committerChip Salzenberg <chip@atlantic.net>1997-02-11 07:29:00 +1200
commitaa3060398a4e37b7717d3d3ed9ffd2cf35035e26 (patch)
treed44754d4869806be33ed7a00fa861a5e1dd759b8 /pp.c
parentdc28f22bb2b1060caded9429d0b1ed07e8890332 (diff)
downloadperl-aa3060398a4e37b7717d3d3ed9ffd2cf35035e26.tar.gz
Catch C<use integer; $x % 0>
Diffstat (limited to 'pp.c')
-rw-r--r--pp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/pp.c b/pp.c
index 5cab7a21cb..b394426cbf 100644
--- a/pp.c
+++ b/pp.c
@@ -1138,6 +1138,8 @@ PP(pp_i_modulo)
dSP; dATARGET; tryAMAGICbin(mod,opASSIGN);
{
dPOPTOPiirl;
+ if (!right)
+ DIE("Illegal modulus zero");
SETi( left % right );
RETURN;
}