Fix division-by-zero bug translating @MPW_MAX@ to an @mp@.
authormdw <mdw>
Sun, 13 Jan 2002 19:23:16 +0000 (19:23 +0000)
committermdw <mdw>
Sun, 13 Jan 2002 19:23:16 +0000 (19:23 +0000)
mpint.h

diff --git a/mpint.h b/mpint.h
index 9d83185..ed614a8 100644 (file)
--- a/mpint.h
+++ b/mpint.h
@@ -1,6 +1,6 @@
 /* -*-c-*-
  *
 /* -*-c-*-
  *
- * $Id: mpint.h,v 1.4 2000/10/08 12:04:01 mdw Exp $
+ * $Id: mpint.h,v 1.5 2002/01/13 19:23:16 mdw Exp $
  *
  * Conversion between MPs and standard C integers
  *
  *
  * Conversion between MPs and standard C integers
  *
@@ -30,6 +30,9 @@
 /*----- Revision history --------------------------------------------------* 
  *
  * $Log: mpint.h,v $
 /*----- Revision history --------------------------------------------------* 
  *
  * $Log: mpint.h,v $
+ * Revision 1.5  2002/01/13 19:23:16  mdw
+ * Fix division-by-zero bug translating @MPW_MAX@ to an @mp@.
+ *
  * Revision 1.4  2000/10/08 12:04:01  mdw
  * Remove spurious semicolon.
  *
  * Revision 1.4  2000/10/08 12:04:01  mdw
  * Remove spurious semicolon.
  *
      * up all of my negative arithmetic.  So do an explicit test here. \
      */                                                                        \
                                                                        \
      * up all of my negative arithmetic.  So do an explicit test here. \
      */                                                                        \
                                                                        \
-    if (_i > -MPW_MAX)                                                 \
+    if (_i >= -MPW_MAX)                                                        \
       break;                                                           \
     else                                                               \
       _i /= (type)MPW_MAX + 1;                                         \
       break;                                                           \
     else                                                               \
       _i /= (type)MPW_MAX + 1;                                         \