summaryrefslogtreecommitdiff
path: root/pp.c
diff options
context:
space:
mode:
Diffstat (limited to 'pp.c')
-rw-r--r--pp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/pp.c b/pp.c
index 941cc9d31a..9858f91b48 100644
--- a/pp.c
+++ b/pp.c
@@ -2846,14 +2846,15 @@ PP(pp_i_multiply)
PP(pp_i_divide)
{
+ IV num;
dVAR; dSP; dATARGET;
tryAMAGICbin_MG(div_amg, AMGf_assign);
{
dPOPTOPssrl;
- IV num = SvIV_nomg(left);
- IV value = left==right ? SvIV(right) : SvIV_nomg(right);
+ IV value = SvIV_nomg(right);
if (value == 0)
DIE(aTHX_ "Illegal division by zero");
+ num = SvIV_nomg(left);
/* avoid FPE_INTOVF on some platforms when num is IV_MIN */
if (value == -1)