This is a fix for the bug
https://gmplib.org/list-archives/gmp-bugs/2018-February/004304.html

Regards.

Trevor Spiteri


diff -r 164971d5c8d0 mpz/set_str.c
--- a/mpz/set_str.c    Sat Feb 10 18:05:32 2018 +0100
+++ b/mpz/set_str.c    Wed Feb 14 00:35:11 2018 +0100
@@ -71,7 +71,9 @@
   if (c == '-')
     {
       negative = 1;
-      c = (unsigned char) *str++;
+      do
+        c = (unsigned char) *str++;
+      while (isspace (c));
     }
 
   if (digit_value[c] >= (base == 0 ? 10 : base))

_______________________________________________
gmp-devel mailing list
gmp-devel@gmplib.org
https://gmplib.org/mailman/listinfo/gmp-devel

Reply via email to