Correctly work with the bizarre negative bases the @mptext@ functions allow.
authormdw <mdw>
Wed, 26 Oct 2005 15:42:43 +0000 (15:42 +0000)
committermdw <mdw>
Wed, 26 Oct 2005 15:42:43 +0000 (15:42 +0000)
mptext-len.c

index cf208af..ffb2df9 100644 (file)
@@ -73,6 +73,7 @@ size_t mptext_len(mp *x, int r)
 
   /* --- Find the right pair of points --- */
 
+  if (r < 0) r = -r;
   do {
     s = ss;
     d++;