Catch C<use integer; $x % 0>
Chip Salzenberg [Wed, 5 Feb 1997 20:59:11 +0000 (08:59 +1200)]
pp.c

diff --git a/pp.c b/pp.c
index 5cab7a2..b394426 100644 (file)
--- 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;
     }