/* -*-c-*-
*
- * $Id: mpx.c,v 1.18 2004/04/01 12:50:09 mdw Exp $
+ * $Id: mpx.c,v 1.19 2004/04/03 03:29:40 mdw Exp $
*
* Low-level multiprecision arithmetic
*
/*----- Revision history --------------------------------------------------*
*
* $Log: mpx.c,v $
+ * Revision 1.19 2004/04/03 03:29:40 mdw
+ * Fix overrun in @mpx_lsr@.
+ *
* Revision 1.18 2004/04/01 12:50:09 mdw
* Add cyclic group abstraction, with test code. Separate off exponentation
* functions for better static linking. Fix a buttload of bugs on the way.
/* --- Single bit shifting --- */
else if (n == 1) {
- mpw w = *av++ >> 1;
+ mpw w = av < avl ? *av++ >> 1 : 0;
while (av < avl) {
mpw t;
if (dv >= dvl)