diff options
Diffstat (limited to 'pp.c')
-rw-r--r-- | pp.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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) |