aboutsummaryrefslogtreecommitdiffstats
path: root/numeric.c
diff options
context:
space:
mode:
Diffstat (limited to 'numeric.c')
-rw-r--r--numeric.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/numeric.c b/numeric.c
index 28ad30d764..ee8c032eef 100644
--- a/numeric.c
+++ b/numeric.c
@@ -3892,6 +3892,7 @@ int_pow(long x, unsigned long y)
int neg = x < 0;
long z = 1;
+ if (y == 0) return INT2FIX(1);
if (neg) x = -x;
if (y & 1)
z = x;