Add an assert
diff --git a/src/num.c b/src/num.c
index e0b841f..3b61b4b 100644
--- a/src/num.c
+++ b/src/num.c
@@ -1740,6 +1740,7 @@
 				n->num[i + 1] = 0;
 			}
 
+			assert(pow < BC_BASE_POW);
 			n->num[i + 1] += n->num[i] / ((BcDig) pow);
 			n->num[i] %= (BcDig) pow;
 		}