diff src/lread.c @ 5489:159face738c3

Never pass a leading + to mpz_set_string, parse_integer (). src/ChangeLog addition: 2011-05-01 Aidan Kehoe <kehoea@parhasard.net> * lread.c (parse_integer): GMP's mpz_set_string deals with a leading plus badly, make sure it never sees one coming from this function. tests/ChangeLog addition: 2011-05-01 Aidan Kehoe <kehoea@parhasard.net> * automated/lisp-reader-tests.el: If the bignum feature is available, check that a leading plus sign is treated correctly when reading bignum integers.
author Aidan Kehoe <kehoea@parhasard.net>
date Sun, 01 May 2011 13:51:33 +0100
parents 8d29f1c4bb98
children 58b38d5b32d0
line wrap: on
line diff
--- a/src/lread.c	Sat Apr 30 17:38:35 2011 +0200
+++ b/src/lread.c	Sun May 01 13:51:33 2011 +0100
@@ -2028,6 +2028,9 @@
   else if (*p == '+')
     {
       p++;
+      /* GMP deals with a leading plus sign, badly, make sure it doesn't see
+	 it. */
+      buf++;
     }
 
   if (p == lim)